Skip to content

Commit eeef491

Browse files
committed
Use filepath for joins to fix windows paths
1 parent 8be47db commit eeef491

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/e2e_test.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"io"
66
"os"
77
"os/exec"
8-
"path"
98
"path/filepath"
109
"syscall"
1110
"testing"
@@ -87,9 +86,9 @@ func TestCng(t *testing.T) {
8786
if curDir == "" {
8887
wd, err := os.Getwd()
8988
assert.NoError(t, err)
90-
curDir = path.Join(wd, "..")
89+
curDir = filepath.Join(wd, "..")
9190
}
92-
binDir := path.Join(curDir, "dist")
91+
binDir := filepath.Join(curDir, "dist")
9392

9493
for _, test := range tests {
9594
t.Run(test.name, func(t *testing.T) {
@@ -207,7 +206,7 @@ func command(t *testing.T, binDir string, stdout, stderr io.Writer, conf conf) *
207206
}
208207
parts = append(parts, conf.pattern)
209208
parts = append(parts, "--", "echo", "hello")
210-
cmd := exec.Command(path.Join(binDir, "cng"), parts...)
209+
cmd := exec.Command(filepath.Join(binDir, "cng"), parts...)
211210
cmd.Stdout = stdout
212211
cmd.Stderr = stderr
213212
return cmd

0 commit comments

Comments
 (0)