2016-03-06 19:18:46 +00:00
|
|
|
package commands
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"os/exec"
|
|
|
|
)
|
|
|
|
|
2016-03-06 20:37:49 +00:00
|
|
|
// Run executes an external command
|
2016-03-06 19:18:46 +00:00
|
|
|
func Run(command string, args []string, path string) error {
|
|
|
|
cmd := exec.Command(command, args...)
|
|
|
|
cmd.Dir = path
|
|
|
|
cmd.Stdout = os.Stderr
|
|
|
|
cmd.Stderr = os.Stderr
|
|
|
|
return cmd.Run()
|
|
|
|
}
|