From 228643aa94f12fe79625c5a3500de768908a3a5f Mon Sep 17 00:00:00 2001 From: Umputun Date: Thu, 1 Feb 2024 14:23:42 -0600 Subject: [PATCH] make test for local shell work without os shell set for github actions --- pkg/config/command_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/config/command_test.go b/pkg/config/command_test.go index 852f190b..1f3b3b9d 100644 --- a/pkg/config/command_test.go +++ b/pkg/config/command_test.go @@ -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) {