Skip to content

Commit

Permalink
make test for local shell work without os shell set for github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
umputun committed Feb 1, 2024
1 parent 5b8c2de commit 228643a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/config/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,11 @@ func TestCmd_shell(t *testing.T) {

t.Run("shell is not set, local", func(t *testing.T) {
c := Cmd{Options: CmdOptions{Local: true}}
assert.Equal(t, os.Getenv("SHELL"), c.shell())
exp := "/bin/sh"
if os.Getenv("SHELL") != "" {
exp = os.Getenv("SHELL")
}
assert.Equal(t, exp, c.shell())
})

t.Run("shell is set, local", func(t *testing.T) {
Expand Down

0 comments on commit 228643a

Please sign in to comment.