From 52e3dcde67bf679aea491922761e79fb243b2a80 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 7 Oct 2025 08:00:27 -0500 Subject: useful --- run.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 { -- cgit v1.2.3