diff options
| -rw-r--r-- | cmd.go | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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() |
