summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-03 02:47:52 -0500
committerJeff Carr <[email protected]>2025-10-03 02:47:52 -0500
commit00f96ead053ded181a3c4e89ff09c540a29356a0 (patch)
tree9673bb12057dc31b25ff4a75035ed5e7aecd794e
parent4efd88947cc7abd2e42d7d4e6e9fb1ce81def8e0 (diff)
-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()