aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Reiter2017-12-01 22:07:21 +0100
committerMarkus Reiter2017-12-01 22:16:49 +0100
commit76c64f9bbf54c9f3b6915469f170d1f8c02be208 (patch)
treebc42d56e9b270efc6ffcf44295cd709397184a0a
parent1b289226284d87c846825563624661ced315b11a (diff)
downloadbrew-76c64f9bbf54c9f3b6915469f170d1f8c02be208.tar.bz2
Fix SystemCommand escaping … again.
-rw-r--r--Library/Homebrew/cask/lib/hbc/system_command.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/system_command.rb b/Library/Homebrew/cask/lib/hbc/system_command.rb
index f64d85c07..86e4d2268 100644
--- a/Library/Homebrew/cask/lib/hbc/system_command.rb
+++ b/Library/Homebrew/cask/lib/hbc/system_command.rb
@@ -50,11 +50,7 @@ module Hbc
end
def command
- @command ||= if sudo?
- [*sudo_prefix, executable, *args]
- else
- [Shellwords.shellescape(executable), *args]
- end
+ [*sudo_prefix, executable, *args]
end
private
@@ -85,8 +81,10 @@ module Hbc
end
def each_output_line(&b)
+ executable, *args = expanded_command
+
raw_stdin, raw_stdout, raw_stderr, raw_wait_thr =
- Open3.popen3(*expanded_command, **options)
+ Open3.popen3([executable, executable], *args, **options)
write_input_to(raw_stdin)
raw_stdin.close_write