From cd36b2cc313e6bbf8bf9d09379fec3187875f593 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 21 Nov 2026 11:31:13 +0000 Subject: [PATCH] bin/release reads only stdout from the commands it parses gh 2.105 writes hint: lines on stderr, which run mixed into the JSON of gh pr view, so the release crashed right after opening its pull request. stderr is now shown only when a command fails. Assisted-by: Claude [Claude Code] --- bin/release | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/release b/bin/release index 249f3f5..5148e25 100755 --- a/bin/release +++ b/bin/release @@ -27,9 +27,11 @@ require "tempfile" CHANGELOG = "CHANGELOG.md" REFERENCE = /^\[([^\]]+)\]: (\S+)$/ +# Returns what the command writes on stdout: callers parse it (JSON, a branch, a commit), so whatever it writes on +# stderr (gh's hints, git's progress) is shown only when it fails. def run(*command) - output, status = Open3.capture2e(*command) - abort "#{command.join(" ")} failed:\n#{output}" unless status.success? + output, errors, status = Open3.capture3(*command) + abort "#{command.join(" ")} failed:\n#{output}#{errors}" unless status.success? output end