Skip to content

Commit

Permalink
Report CLI failures to stderr, not stdout
Browse files Browse the repository at this point in the history
This corrects a problem from #537, wherein I was doing a lot of
refactoring for testing purposes, and accidentally changed a place where
failures were reported from stderr to stdout.
  • Loading branch information
brandur committed Aug 22, 2024
1 parent 6a0d904 commit 2a9dd1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/river/rivercli/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func RunCommand[TOpts CommandOpts](ctx context.Context, bundle *RunCommandBundle

ok, err := procureAndRun()
if err != nil {
fmt.Fprintf(os.Stdout, "failed: %s\n", err)
fmt.Fprintf(os.Stderr, "failed: %s\n", err)
}
if err != nil || !ok {
os.Exit(1)
Expand Down

0 comments on commit 2a9dd1a

Please sign in to comment.