aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-10-26 03:39:51 +0900
committerOphestra <cat@gensokyo.uk>2025-10-26 03:41:19 +0900
commit4a463b7f032961323baa0c5cc4bac0594a90ec42 (patch)
tree551c5b5cc246d5bd1bd5cfbe4ee2121cebedf80e /cmd
parentdacd9550e0f696d8e6723a304ba056502109201f (diff)
internal/app/state: use absolute pathnames
This is less error-prone and fits better into internal/app which already uses check.Absolute for all pathnames. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/hakurei/command.go2
-rw-r--r--cmd/hakurei/parse.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd/hakurei/command.go b/cmd/hakurei/command.go
index 39ec15a2..53db7533 100644
--- a/cmd/hakurei/command.go
+++ b/cmd/hakurei/command.go
@@ -321,7 +321,7 @@ func buildCommand(ctx context.Context, msg message.Msg, early *earlyHardeningErr
c.NewCommand("ps", "List active instances", func(args []string) error {
var sc hst.Paths
app.CopyPaths().Copy(&sc, new(app.Hsu).MustID(nil))
- printPs(os.Stdout, time.Now().UTC(), state.NewMulti(msg, sc.RunDirPath.String()), flagShort, flagJSON)
+ printPs(os.Stdout, time.Now().UTC(), state.NewMulti(msg, sc.RunDirPath), flagShort, flagJSON)
return errSuccess
}).Flag(&flagShort, "short", command.BoolFlag(false), "Print instance id")
}
diff --git a/cmd/hakurei/parse.go b/cmd/hakurei/parse.go
index 4e0d2d7b..13f4d37a 100644
--- a/cmd/hakurei/parse.go
+++ b/cmd/hakurei/parse.go
@@ -84,7 +84,7 @@ func tryIdentifier(msg message.Msg, name string) (config *hst.Config, entry *hst
return tryIdentifierEntries(msg, name, func() map[hst.ID]*hst.State {
var sc hst.Paths
app.CopyPaths().Copy(&sc, new(app.Hsu).MustID(nil))
- s := state.NewMulti(msg, sc.RunDirPath.String())
+ s := state.NewMulti(msg, sc.RunDirPath)
if entries, err := state.Join(s); err != nil {
msg.GetLogger().Printf("cannot join store: %v", err) // not fatal
return nil