diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-12-21 09:37:48 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-02-08 14:40:30 -0800 |
commit | 09f32d4f845511638ec162be426eeffb51036b6b (patch) | |
tree | 1f628ef91273e37da8bc5f4d901f1a91ba865fa6 /pkg/commands/oscommands/os_test.go | |
parent | 6f0f70bd924b444a5f755046c1da25c0f31e352e (diff) |
add secureexec file for getting around windows checking for a binary first in the current dir
Diffstat (limited to 'pkg/commands/oscommands/os_test.go')
-rw-r--r-- | pkg/commands/oscommands/os_test.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/commands/oscommands/os_test.go b/pkg/commands/oscommands/os_test.go index f8b3767bf..1504e4322 100644 --- a/pkg/commands/oscommands/os_test.go +++ b/pkg/commands/oscommands/os_test.go @@ -6,6 +6,7 @@ import ( "os/exec" "testing" + "github.com/jesseduffield/lazygit/pkg/secureexec" "github.com/stretchr/testify/assert" ) @@ -70,7 +71,7 @@ func TestOSCommandOpenFile(t *testing.T) { { "test", func(name string, arg ...string) *exec.Cmd { - return exec.Command("exit", "1") + return secureexec.Command("exit", "1") }, func(err error) { assert.Error(t, err) @@ -81,7 +82,7 @@ func TestOSCommandOpenFile(t *testing.T) { func(name string, arg ...string) *exec.Cmd { assert.Equal(t, "open", name) assert.Equal(t, []string{"test"}, arg) - return exec.Command("echo") + return secureexec.Command("echo") }, func(err error) { assert.NoError(t, err) @@ -92,7 +93,7 @@ func TestOSCommandOpenFile(t *testing.T) { func(name string, arg ...string) *exec.Cmd { assert.Equal(t, "open", name) assert.Equal(t, []string{"filename with spaces"}, arg) - return exec.Command("echo") + return secureexec.Command("echo") }, func(err error) { assert.NoError(t, err) |