summaryrefslogtreecommitdiff
path: root/run.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-07 08:00:27 -0500
committerJeff Carr <[email protected]>2025-10-07 08:00:27 -0500
commit52e3dcde67bf679aea491922761e79fb243b2a80 (patch)
tree4ab1711a68fba9f123027741ebca4526a9ccad6d /run.go
parent5398d895e3a841c81df7079eb3a3c9a4a9904829 (diff)
Diffstat (limited to 'run.go')
-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 {