summaryrefslogtreecommitdiff
path: root/cmd.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd.go')
-rw-r--r--cmd.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/cmd.go b/cmd.go
index eb6604f..f60c48f 100644
--- a/cmd.go
+++ b/cmd.go
@@ -140,6 +140,19 @@ func RunRealtime(args []string) cmd.Status {
return PathRunRealtime("", args)
}
+func RunRealtimeError(args []string) (*cmd.Status, error) {
+ result := PathRunRealtime("", args)
+ if result.Error != nil {
+ log.Warn(args, "wow. golang is cool. an os.Error:", result.Error)
+ return &result, result.Error
+ }
+ if result.Exit != 0 {
+ // log.Warn(cmd, "failed with", result.Exit, repo.GetGoPath())
+ return &result, errors.New(fmt.Sprintf("%v failed with %v", args, result.Exit))
+ }
+ return &result, nil
+}
+
func RunEcho(cmd []string) cmd.Status {
result := RunQuiet(cmd)
pwd, _ := os.Getwd()