From 2a9dd1a533b2b759c074d5ccd419aa948f640452 Mon Sep 17 00:00:00 2001 From: Brandur Date: Thu, 22 Aug 2024 05:47:41 -0700 Subject: [PATCH] Report CLI failures to stderr, not stdout 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. --- cmd/river/rivercli/command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/river/rivercli/command.go b/cmd/river/rivercli/command.go index 93c88471..57e30691 100644 --- a/cmd/river/rivercli/command.go +++ b/cmd/river/rivercli/command.go @@ -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)