Skip to content

Commit dbf0ec8

Browse files
committed
Update unit test to reflect new bash path on GitHub Actions Windows runner.
1 parent 544d342 commit dbf0ec8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

internal/subshell/subshell_win_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,24 @@ func setup(t *testing.T) {
2727
func TestBash(t *testing.T) {
2828
setup(t)
2929

30-
os.Setenv("SHELL", `C:\Program Files\bash.exe`)
30+
shellPath := `C:\Program Files\Git\usr\bin\bash.exe`
31+
os.Setenv("SHELL", shellPath)
3132
cfg, err := config.New()
3233
require.NoError(t, err)
3334
subs := New(cfg)
34-
assert.Equal(t, `C:\Program Files\bash.exe`, subs.Binary())
35+
assert.Equal(t, shellPath, subs.Binary())
3536

3637
}
3738

3839
func TestBashDontEscapeSpace(t *testing.T) {
3940
setup(t)
4041

4142
// Reproduce bug in which paths are being incorrectly escaped on windows
42-
os.Setenv("SHELL", `C:\Program\ Files\bash.exe`)
43+
os.Setenv("SHELL", `C:\Program\ Files\Git\usr\bin\bash.exe`)
4344
cfg, err := config.New()
4445
require.NoError(t, err)
4546
subs := New(cfg)
46-
assert.Equal(t, `C:\Program Files\bash.exe`, subs.Binary())
47+
assert.Equal(t, `C:\Program Files\Git\usr\bin\bash.exe`, subs.Binary())
4748
}
4849

4950
func TestRunCommandError(t *testing.T) {

0 commit comments

Comments
 (0)