internal/app/paths: do not print messages
All checks were successful
Test / Create distribution (push) Successful in 56s
Test / Sandbox (push) Successful in 2m32s
Test / Hakurei (push) Successful in 3m36s
Test / Hpkg (push) Successful in 4m30s
Test / Hakurei (race detector) (push) Successful in 5m40s
Test / Sandbox (race detector) (push) Successful in 2m12s
Test / Flake checks (push) Successful in 1m32s

This change was missed while merging the rest of the logging changes.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-09-29 09:30:57 +09:00
parent afa1a8043e
commit 71e70b7b5f
5 changed files with 8 additions and 11 deletions

View File

@@ -210,7 +210,7 @@ func buildCommand(ctx context.Context, msg container.Msg, early *earlyHardeningE
c.NewCommand("show", "Show live or local app configuration", func(args []string) error {
switch len(args) {
case 0: // system
printShowSystem(msg, os.Stdout, flagShort, flagJSON)
printShowSystem(os.Stdout, flagShort, flagJSON)
case 1: // instance
name := args[0]
@@ -231,7 +231,7 @@ func buildCommand(ctx context.Context, msg container.Msg, early *earlyHardeningE
var flagShort bool
c.NewCommand("ps", "List active instances", func(args []string) error {
var sc hst.Paths
app.CopyPaths(msg, &sc, new(app.Hsu).MustID())
app.CopyPaths(&sc, new(app.Hsu).MustID())
printPs(os.Stdout, time.Now().UTC(), state.NewMulti(msg, sc.RunDirPath.String()), flagShort, flagJSON)
return errSuccess
}).Flag(&flagShort, "short", command.BoolFlag(false), "Print instance id")

View File

@@ -89,7 +89,7 @@ func tryShort(msg container.Msg, name string) (config *hst.Config, entry *state.
msg.Verbose("argument looks like prefix")
var sc hst.Paths
app.CopyPaths(msg, &sc, new(app.Hsu).MustID())
app.CopyPaths(&sc, new(app.Hsu).MustID())
s := state.NewMulti(msg, sc.RunDirPath.String())
if entries, err := state.Join(s); err != nil {
log.Printf("cannot join store: %v", err)

View File

@@ -11,19 +11,18 @@ import (
"text/tabwriter"
"time"
"hakurei.app/container"
"hakurei.app/hst"
"hakurei.app/internal/app"
"hakurei.app/internal/app/state"
"hakurei.app/system/dbus"
)
func printShowSystem(msg container.Msg, output io.Writer, short, flagJSON bool) {
func printShowSystem(output io.Writer, short, flagJSON bool) {
t := newPrinter(output)
defer t.MustFlush()
info := &hst.Info{User: new(app.Hsu).MustID()}
app.CopyPaths(msg, &info.Paths, info.User)
app.CopyPaths(&info.Paths, info.User)
if flagJSON {
printJSON(output, short, info)