From 6e0f686afa90c379535e78606851be7078150fd6 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Tue, 14 Nov 2023 10:22:03 -0500 Subject: [PATCH] `--format json` should work in interactive mode --- cmd/cmd.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/cmd.go b/cmd/cmd.go index bc70095c..5f2afb0d 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -542,7 +542,11 @@ func generateInteractive(cmd *cobra.Command, model string) error { return err } - var format string + format, err := cmd.Flags().GetString("format") + if err != nil { + return err + } + var wordWrap bool termType := os.Getenv("TERM") if termType == "xterm-256color" {