From 873954cb71dc76dd2e1e5c57c18a1a31b3cf2c0c Mon Sep 17 00:00:00 2001 From: Max Eisner <4730112+max-ae@users.noreply.github.com> Date: Thu, 11 Aug 2022 21:32:03 +0200 Subject: [PATCH] Revert "simplify" This reverts commit 2369a58665d151035cb8047343a10fb9e0f40806. --- Library/Homebrew/formula.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index e8220d1fa0..162d93fbac 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -1704,8 +1704,13 @@ class Formula "#{shell_parameter_format}#{shell}" end + popen_read_args = %w[] + popen_read_args << commands + popen_read_args << shell_parameter + popen_read_args.flatten! + script_path.dirname.mkpath - script_path.write Utils.safe_popen_read({ "SHELL" => shell.to_s }, *commands, shell_parameter) + script_path.write Utils.safe_popen_read({ "SHELL" => shell.to_s }, *popen_read_args) end end