Skip to content

Commit

Permalink
Make more clear that stderr follows (#5)
Browse files Browse the repository at this point in the history
Particularly for the Bazel case, in a long CI long, it can be unclear
that you should read on past the line.
  • Loading branch information
illicitonion authored Jun 13, 2022
1 parent 5061939 commit 83c4098
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/target_determinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func GitRevParse(workingDirectory string, rev string, isAbbrevRef bool) (string,
gitCmd.Stderr = &stderrBuf
err := gitCmd.Run()
if err != nil {
return "", fmt.Errorf("could not parse revision '%v': %w. Stderr: %v", rev, err, stderrBuf.String())
return "", fmt.Errorf("could not parse revision '%v': %w. Stderr from git ↓↓\n%v", rev, err, stderrBuf.String())
}
return strings.Trim(stdoutBuf.String(), "\n"), nil
}
Expand Down Expand Up @@ -493,7 +493,7 @@ func clearAnalysisCache(context *Context) error {
cmd.Dir = context.WorkspacePath
cmd.Stderr = &stderr
if err := cmd.Run(); err != nil {
return fmt.Errorf("failed to discard Bazel analysis cache in %v: %w. Stderr:\n%v", context.WorkspacePath, err, stderr.String())
return fmt.Errorf("failed to discard Bazel analysis cache in %v: %w. Stderr from Bazel ↓↓\n%v", context.WorkspacePath, err, stderr.String())
}
}

Expand Down

0 comments on commit 83c4098

Please sign in to comment.