From 1209fc046f9669a9b418b7dd759caf4224ab2098 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 19 Dec 2022 20:09:23 -0800 Subject: [PATCH] formula: show stderr by default when generating completions --- Library/Homebrew/formula.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 5bac71b555..5027cce25e 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -1781,8 +1781,11 @@ class Formula popen_read_args << shell_parameter if shell_parameter.present? popen_read_args.flatten! + popen_read_options = {} + popen_read_options[:err] = :err unless ENV["HOMEBREW_STDERR"] + script_path.dirname.mkpath - script_path.write Utils.safe_popen_read(popen_read_env, *popen_read_args) + script_path.write Utils.safe_popen_read(popen_read_env, *popen_read_args, **popen_read_options) end end