diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-01-21 11:59:15 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-01-21 12:05:31 +0900 |
| commit | fa0616b2748e363fee23c9cd1a01f286f6dba73c (patch) | |
| tree | f6143e06350a69c59d105c68a9cce316a97ab176 | |
| parent | 20a3d4c458d3df7488e3fa444a5b849f99d55d9e (diff) | |
fortify: print permissive defaults warning early
Signed-off-by: Ophestra <cat@gensokyo.uk>
| -rw-r--r-- | print.go | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -53,6 +53,10 @@ func printShowInstance(instance *state.State, config *fst.Config, short bool) { now := time.Now().UTC() w := tabwriter.NewWriter(direct.Stdout, 0, 1, 4, ' ', 0) + if config.Confinement.Sandbox == nil { + fmt.Print("Warning: this configuration uses permissive defaults!\n\n") + } + if instance != nil { fmt.Fprintf(w, "State\n") fmt.Fprintf(w, " Instance:\t%s (%d)\n", instance.ID.String(), instance.PID) @@ -106,9 +110,6 @@ func printShowInstance(instance *state.State, config *fst.Config, short bool) { // Env map[string]string `json:"env"` // Link [][2]string `json:"symlink"` - } else { - // this gets printed before everything else - fmt.Println("WARNING: current configuration uses permissive defaults!") } fmt.Fprintf(w, " Command:\t%s\n", strings.Join(config.Command, " ")) fmt.Fprintf(w, "\n") |
