aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/hakurei/command.go3
-rw-r--r--cmd/hakurei/parse.go3
-rw-r--r--cmd/hakurei/print.go3
3 files changed, 6 insertions, 3 deletions
diff --git a/cmd/hakurei/command.go b/cmd/hakurei/command.go
index 53db7533..968bb561 100644
--- a/cmd/hakurei/command.go
+++ b/cmd/hakurei/command.go
@@ -20,6 +20,7 @@ import (
"hakurei.app/internal"
"hakurei.app/internal/app"
"hakurei.app/internal/app/state"
+ "hakurei.app/internal/env"
"hakurei.app/message"
"hakurei.app/system/dbus"
)
@@ -320,7 +321,7 @@ func buildCommand(ctx context.Context, msg message.Msg, early *earlyHardeningErr
var flagShort bool
c.NewCommand("ps", "List active instances", func(args []string) error {
var sc hst.Paths
- app.CopyPaths().Copy(&sc, new(app.Hsu).MustID(nil))
+ env.CopyPaths().Copy(&sc, new(app.Hsu).MustID(nil))
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 13f4d37a..70419751 100644
--- a/cmd/hakurei/parse.go
+++ b/cmd/hakurei/parse.go
@@ -13,6 +13,7 @@ import (
"hakurei.app/hst"
"hakurei.app/internal/app"
"hakurei.app/internal/app/state"
+ "hakurei.app/internal/env"
"hakurei.app/message"
)
@@ -83,7 +84,7 @@ func shortIdentifierString(s string) string {
func tryIdentifier(msg message.Msg, name string) (config *hst.Config, entry *hst.State) {
return tryIdentifierEntries(msg, name, func() map[hst.ID]*hst.State {
var sc hst.Paths
- app.CopyPaths().Copy(&sc, new(app.Hsu).MustID(nil))
+ env.CopyPaths().Copy(&sc, new(app.Hsu).MustID(nil))
s := state.NewMulti(msg, sc.RunDirPath)
if entries, err := state.Join(s); err != nil {
msg.GetLogger().Printf("cannot join store: %v", err) // not fatal
diff --git a/cmd/hakurei/print.go b/cmd/hakurei/print.go
index 06c8b2a9..0dcb59ee 100644
--- a/cmd/hakurei/print.go
+++ b/cmd/hakurei/print.go
@@ -14,6 +14,7 @@ import (
"hakurei.app/internal"
"hakurei.app/internal/app"
"hakurei.app/internal/app/state"
+ "hakurei.app/internal/env"
"hakurei.app/message"
)
@@ -23,7 +24,7 @@ func printShowSystem(output io.Writer, short, flagJSON bool) {
defer t.MustFlush()
info := &hst.Info{Version: internal.Version(), User: new(app.Hsu).MustID(nil)}
- app.CopyPaths().Copy(&info.Paths, info.User)
+ env.CopyPaths().Copy(&info.Paths, info.User)
if flagJSON {
encodeJSON(log.Fatal, output, short, info)