mirror of
https://github.com/danog/gllvm.git
synced 2024-11-26 23:24:42 +01:00
20 lines
358 B
Go
20 lines
358 B
Go
package main
|
|
|
|
import(
|
|
"os"
|
|
"os/exec"
|
|
)
|
|
|
|
// Executes a command then returns true if there was an error
|
|
func execCmd(cmdExecName string, args []string, workingDir string) bool {
|
|
cmd := exec.Command(cmdExecName, args...)
|
|
cmd.Stdout = os.Stdout
|
|
cmd.Stderr = os.Stderr
|
|
cmd.Dir = workingDir
|
|
if cmd.Run() == nil {
|
|
return false
|
|
} else {
|
|
return true
|
|
}
|
|
}
|