feat(cli): read .env value to set or not the json output
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user