From cbe8b7c2b4a35d4b229f0e8c6d3f9c7e74859bfc Mon Sep 17 00:00:00 2001 From: Amisha Singla Date: Mon, 2 Dec 2024 13:52:17 -0600 Subject: [PATCH] run command directly --- cmd/command_utils.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/command_utils.go b/cmd/command_utils.go index 1048725..bfd5310 100644 --- a/cmd/command_utils.go +++ b/cmd/command_utils.go @@ -9,7 +9,6 @@ import ( "log" "os" "os/exec" - "path" "path/filepath" "sort" "strings" @@ -244,10 +243,11 @@ func RunCLITest(t *testing.T, test CliTest, GoldenFolder string, executableName } } - cmd := exec.Command(path.Join(dir, executableName), test.Args...) - fmt.Printf("Command: %s %v\n", path.Join(dir, executableName), test.Args) + cmd := exec.Command(executableName, test.Args...) + fmt.Printf("Command: %s %v\n", executableName, test.Args) errOut, actualError := cmd.CombinedOutput() fmt.Println(actualError) + fmt.Println(errOut) if idxOfOutputArg > -1 { stat, err = os.Stat(outLocation) assert.NoError(t, err)