Index: logdog/client/cmd/logdog_butler/subcommand_run.go |
diff --git a/logdog/client/cmd/logdog_butler/subcommand_run.go b/logdog/client/cmd/logdog_butler/subcommand_run.go |
index be5afa16a2f1f6590750b15a4589583d95f9b9e9..6ec39ae57a13a3bcce43a3feda8944d6f942ed99 100644 |
--- a/logdog/client/cmd/logdog_butler/subcommand_run.go |
+++ b/logdog/client/cmd/logdog_butler/subcommand_run.go |
@@ -305,19 +305,19 @@ func (cmd *runCommandRun) Run(app subcommands.Application, args []string, _ subc |
// Add our pipes as direct streams, if configured. |
if stdout != nil { |
if err := b.AddStream(stdout, cmd.stdout.properties()); err != nil { |
- return errors.Annotate(err).Reason("failed to attach STDOUT pipe stream").Err() |
+ return errors.Annotate(err, "failed to attach STDOUT pipe stream").Err() |
} |
} |
if stderr != nil { |
if err := b.AddStream(stderr, cmd.stderr.properties()); err != nil { |
- return errors.Annotate(err).Reason("failed to attach STDERR pipe stream").Err() |
+ return errors.Annotate(err, "failed to attach STDERR pipe stream").Err() |
} |
} |
// Execute the command. The bootstrapped application will begin executing |
// in the background. |
if err := proc.Start(); err != nil { |
- return errors.Annotate(err).Reason("failed to start bootstrapped process").Err() |
+ return errors.Annotate(err, "failed to start bootstrapped process").Err() |
} |
// Wait for the process' streams to finish. We must do this before Wait() |
@@ -345,7 +345,7 @@ func (cmd *runCommandRun) Run(app subcommands.Application, args []string, _ subc |
if err == context.Canceled { |
return err |
} |
- return errors.Annotate(err).Reason("failed to Wait() for Butler").Err() |
+ return errors.Annotate(err, "failed to Wait() for Butler").Err() |
} |
return nil |
@@ -379,8 +379,8 @@ func (cmd *runCommandRun) maybeWriteResult(ctx context.Context, r *bootstrapResu |
"path": cmd.resultPath, |
}.Debugf(ctx, "Writing bootstrap result.") |
if err := r.WriteJSON(cmd.resultPath); err != nil { |
- return errors.Annotate(err).Reason("failed to write JSON file"). |
- D("path", cmd.resultPath).Err() |
+ return errors.Annotate(err, "failed to write JSON file"). |
+ InternalReason("path(%s)", cmd.resultPath).Err() |
} |
return nil |
} |