aboutsummaryrefslogtreecommitdiffhomepage
path: root/print.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2024-12-27 18:06:26 +0900
committerOphestra <cat@gensokyo.uk>2024-12-27 18:06:26 +0900
commit2fdbd6a4dd39355e94fdecd7756d4dbf9763b3f0 (patch)
tree03e8b83fc3ce8fdef8bdd036c3e5bc17806d7ecb /print.go
parentaef847b5ae055d5f89e00c19bc341b7464164139 (diff)
fst/config: alternative /etc directory
This is useful for static /etc directories provided by self-contained application packages, or in cases where autoetc is useful for paths other than /etc. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'print.go')
-rw-r--r--print.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/print.go b/print.go
index 25d66755..fb5eb361 100644
--- a/print.go
+++ b/print.go
@@ -70,7 +70,16 @@ func printShow(instance *state.State, config *fst.Config, short bool) {
flags = append(flags, "none")
}
fmt.Fprintf(w, " Flags:\t%s\n", strings.Join(flags, " "))
- fmt.Fprintf(w, " Overrides:\t%s\n", strings.Join(sandbox.Override, " "))
+
+ etc := sandbox.Etc
+ if etc == "" {
+ etc = "/etc"
+ }
+ fmt.Fprintf(w, " Etc:\t%s\n", etc)
+
+ if len(sandbox.Override) > 0 {
+ fmt.Fprintf(w, " Overrides:\t%s\n", strings.Join(sandbox.Override, " "))
+ }
// Env map[string]string `json:"env"`
// Link [][2]string `json:"symlink"`