diff --git a/system/exec_cmd_runner.go b/system/exec_cmd_runner.go index 6cab6558..a6ec3e05 100644 --- a/system/exec_cmd_runner.go +++ b/system/exec_cmd_runner.go @@ -92,3 +92,7 @@ func (r execCmdRunner) buildComplexCommand(cmd Command) *exec.Cmd { return execCmd } + +func newExecCmd(name string, args ...string) *exec.Cmd { + return exec.Command(name, args...) +} diff --git a/system/exec_cmd_runner_unix.go b/system/exec_cmd_runner_unix.go index e049f11a..5096aa45 100644 --- a/system/exec_cmd_runner_unix.go +++ b/system/exec_cmd_runner_unix.go @@ -1,16 +1,12 @@ +//go:build !windows // +build !windows package system import ( - "os/exec" "strings" ) -func newExecCmd(name string, args ...string) *exec.Cmd { - return exec.Command(name, args...) -} - // mergeEnv merges system and command environments variables. Command variables // override any system variable with the same key. func mergeEnv(sysEnv []string, cmdEnv map[string]string) []string { diff --git a/system/exec_cmd_runner_windows.go b/system/exec_cmd_runner_windows.go index 5b057470..bcd6247b 100644 --- a/system/exec_cmd_runner_windows.go +++ b/system/exec_cmd_runner_windows.go @@ -1,15 +1,10 @@ package system import ( - "os/exec" "sort" "strings" ) -func newExecCmd(name string, args ...string) *exec.Cmd { - return exec.Command(name, args...) -} - // mergeEnv case-insensitive merge of system and command environments variables. // Command variables override any system variable with the same key. func mergeEnv(sysEnv []string, cmdEnv map[string]string) []string {