Skip to content

Commit 035015f

Browse files
author
Fabian Holler
committed
fixup! exec: refactor command execution
1 parent fd180db commit 035015f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/exec/command_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
func TestCombinedStdoutOutput(t *testing.T) {
1111
ctx := context.Background()
12-
const echoStr = "hello world!"
12+
const echoStr = "helloWorld!"
1313

1414
// Windows returns StrOutput with surrounding quotation marks
1515
var expected string
@@ -23,7 +23,7 @@ func TestCombinedStdoutOutput(t *testing.T) {
2323
var res *ResultOut
2424
var err error
2525
if runtime.GOOS == "windows" {
26-
res, err = Command("cmd", "/C", "echo", echoStr).RunCombinedOut(ctx)
26+
res, err = Command("bash", "-c", fmt.Sprintf("'echo -n %s'", echoStr)).RunCombinedOut(ctx)
2727
} else {
2828
res, err = Command("echo", "-n", echoStr).RunCombinedOut(ctx)
2929
}

0 commit comments

Comments
 (0)