aboutsummaryrefslogtreecommitdiffhomepage
path: root/print.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-03-31 04:54:10 +0900
committerOphestra <cat@gensokyo.uk>2025-03-31 04:54:10 +0900
commit986105958cdf2071d07b2e1fd2321884e4f09ccc (patch)
tree03c37a8dde2ce0aa96760c3bb453e996372f5dd1 /print.go
parentecdd4d820296162c273c3344f844cf78af0e4426 (diff)
fortify: update show output
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'print.go')
-rw-r--r--print.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/print.go b/print.go
index 891c576b..7af1a22d 100644
--- a/print.go
+++ b/print.go
@@ -77,7 +77,9 @@ func printShowInstance(
if len(config.Confinement.Groups) > 0 {
t.Printf(" Groups:\t%q\n", config.Confinement.Groups)
}
- t.Printf(" Directory:\t%s\n", config.Confinement.Outer)
+ if config.Confinement.Outer != "" {
+ t.Printf(" Directory:\t%s\n", config.Confinement.Outer)
+ }
if config.Confinement.Sandbox != nil {
sandbox := config.Confinement.Sandbox
if sandbox.Hostname != "" {
@@ -114,7 +116,12 @@ func printShowInstance(
// Env map[string]string `json:"env"`
// Link [][2]string `json:"symlink"`
}
- t.Printf(" Command:\t%s\n", strings.Join(config.Args, " "))
+ if config.Confinement.Sandbox != nil {
+ t.Printf(" Path:\t%s\n", config.Path)
+ }
+ if len(config.Args) > 0 {
+ t.Printf(" Arguments:\t%s\n", strings.Join(config.Args, " "))
+ }
t.Printf("\n")
if !short {