summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--run.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/run.go b/run.go
index 5fbeb7c..f659e58 100644
--- a/run.go
+++ b/run.go
@@ -12,6 +12,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(log.Sprintf("%v failed with %v", args, result.Exit))
+ }
+ return &result, nil
+}
+
// this is stuff from a long time ago that there must be a replacement for
func RemoveFirstElement(slice []string) (string, []string) {
if len(slice) == 0 {