Skip to content

Commit

Permalink
run command directly
Browse files Browse the repository at this point in the history
  • Loading branch information
amishas157 committed Dec 2, 2024
1 parent 9e5208e commit cbe8b7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/command_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"log"
"os"
"os/exec"
"path"
"path/filepath"
"sort"
"strings"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit cbe8b7c

Please sign in to comment.