diff options
Diffstat (limited to 'misc/dashboard/builder/exec.go')
| -rw-r--r-- | misc/dashboard/builder/exec.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/misc/dashboard/builder/exec.go b/misc/dashboard/builder/exec.go index a042c5699..7f21abaa2 100644 --- a/misc/dashboard/builder/exec.go +++ b/misc/dashboard/builder/exec.go @@ -6,15 +6,15 @@ package main import ( "bytes" - "exec" "io" "log" "os" + "os/exec" "strings" ) // run is a simple wrapper for exec.Run/Close -func run(envv []string, dir string, argv ...string) os.Error { +func run(envv []string, dir string, argv ...string) error { if *verbose { log.Println("run", argv) } @@ -31,7 +31,7 @@ func run(envv []string, dir string, argv ...string) os.Error { // process combined stdout and stderr output, exit status and error. // The error returned is nil, if process is started successfully, // even if exit status is not 0. -func runLog(envv []string, logfile, dir string, argv ...string) (string, int, os.Error) { +func runLog(envv []string, logfile, dir string, argv ...string) (string, int, error) { if *verbose { log.Println("runLog", argv) } @@ -56,11 +56,11 @@ func runLog(envv []string, logfile, dir string, argv ...string) (string, int, os err := cmd.Run() if err != nil { - if ws, ok := err.(*os.Waitmsg); ok { + if ws, ok := err.(*exec.ExitError); ok { return b.String(), ws.ExitStatus(), nil } } - return b.String(), 0, nil + return b.String(), 0, err } // useBash prefixes a list of args with 'bash' if the first argument |
