mirror of https://github.com/k3d-io/k3d
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
378 B
19 lines
378 B
6 years ago
|
package run
|
||
|
|
||
|
import (
|
||
|
"log"
|
||
|
"os"
|
||
|
"os/exec"
|
||
|
)
|
||
|
|
||
|
// runCommand accepts the name and args and runs the specified command
|
||
|
func runCommand(verbose bool, name string, args ...string) error {
|
||
|
if verbose {
|
||
|
log.Printf("Running command: %+v", append([]string{name}, args...))
|
||
|
}
|
||
|
cmd := exec.Command(name, args...)
|
||
|
cmd.Stdout = os.Stdout
|
||
|
cmd.Stderr = os.Stderr
|
||
|
return cmd.Run()
|
||
|
}
|