AJ ONeal
5 years ago
7 changed files with 64 additions and 64 deletions
@ -1,18 +0,0 @@ |
|||
// +build !windows
|
|||
|
|||
package installer |
|||
|
|||
import ( |
|||
"os/exec" |
|||
"strings" |
|||
) |
|||
|
|||
func whereIs(exe string) (string, error) { |
|||
// TODO use exec.LookPath instead
|
|||
cmd := exec.Command("command", "-v", exe) |
|||
out, err := cmd.Output() |
|||
if nil != err { |
|||
return "", err |
|||
} |
|||
return strings.TrimSpace(string(out)), nil |
|||
} |
@ -0,0 +1,12 @@ |
|||
package runner |
|||
|
|||
import ( |
|||
"os/exec" |
|||
) |
|||
|
|||
func init() { |
|||
cmd, _ := exec.LookPath("cmd.exe") |
|||
if "" != cmd { |
|||
shellArgs = []string{cmd, "/c"} |
|||
} |
|||
} |
Loading…
Reference in new issue