feat(cli): read .env value to set or not the json output

This commit is contained in:
2025-11-21 13:10:53 +01:00
parent 7fca1f78dc
commit 79e072fe6b

View File

@@ -67,7 +67,7 @@ func run(args []string) error {
rootFS.SetOutput(os.Stderr) rootFS.SetOutput(os.Stderr)
rootFS.Usage = printRootUsage rootFS.Usage = printRootUsage
showHelp := rootFS.Bool("help", false, "show this help message") showHelp := rootFS.Bool("help", false, "show this help message")
jsonOutput := rootFS.Bool("json", false, "output results in JSON format") jsonOutput := rootFS.Bool("json", cfg.CLI.JSONOutputDefault, "output results in JSON format")
if err := rootFS.Parse(args); err != nil { if err := rootFS.Parse(args); err != nil {
if errors.Is(err, flag.ErrHelp) { if errors.Is(err, flag.ErrHelp) {