diff options
| author | Jeff Carr <[email protected]> | 2025-10-07 08:00:27 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-07 08:00:27 -0500 |
| commit | 52e3dcde67bf679aea491922761e79fb243b2a80 (patch) | |
| tree | 4ab1711a68fba9f123027741ebca4526a9ccad6d | |
| parent | 5398d895e3a841c81df7079eb3a3c9a4a9904829 (diff) | |
| -rw-r--r-- | run.go | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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 { |
