From 4fc86ee175d91ccd632c5cf4c0f4d36841b295c6 Mon Sep 17 00:00:00 2001 From: Snider Date: Sun, 2 Nov 2025 00:43:33 +0000 Subject: [PATCH] Update cmd/main_test.go Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- cmd/main_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/main_test.go b/cmd/main_test.go index 0b6dd09..9f77255 100644 --- a/cmd/main_test.go +++ b/cmd/main_test.go @@ -7,7 +7,12 @@ import ( func TestExecute(t *testing.T) { // This test simply checks that the Execute function can be called without error. // It doesn't actually test any of the application's functionality. + rootCmd.SetArgs([]string{}) + t.Cleanup(func() { + rootCmd.SetArgs(nil) + }) if err := Execute(); err != nil { t.Errorf("Execute() failed: %v", err) } } +}