diff --git a/internal/commands/messages/html_analysis.go b/internal/commands/messages/html_analysis.go
index a79e582..3205a39 100644
--- a/internal/commands/messages/html_analysis.go
+++ b/internal/commands/messages/html_analysis.go
@@ -44,8 +44,7 @@ func NewCmdHTMLAnalysis(f *cmdutil.Factory) *cobra.Command {
return err
}
- format := cmdutil.GetOutputFormat()
- return output.Print(f.IOStreams.Out, format, result, nil)
+ return output.Print(f.IOStreams.Out, output.FormatJSON, result, nil)
},
}
diff --git a/internal/commands/messages/messages_extended_test.go b/internal/commands/messages/messages_extended_test.go
index 8a79a82..9ffc05f 100644
--- a/internal/commands/messages/messages_extended_test.go
+++ b/internal/commands/messages/messages_extended_test.go
@@ -8,7 +8,6 @@ import (
"testing"
"github.com/mailtrap/mailtrap-cli/internal/commands/messages"
- "github.com/spf13/viper"
)
func TestMessagesUpdate(t *testing.T) {
@@ -152,9 +151,6 @@ func TestMessagesHTMLAnalysis(t *testing.T) {
})
defer cleanup()
- // html-analysis uses GetOutputFormat, so set output to json to ensure clean output
- viper.Set("output", "json")
-
cmd := messages.NewCmdMessages(f)
cmd.SetArgs([]string{"html-analysis", "--sandbox-id", "1", "--id", "1"})
cmd.SetOut(buf)