diff options
Diffstat (limited to 'Library/Homebrew/patch.rb')
| -rw-r--r-- | Library/Homebrew/patch.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/patch.rb b/Library/Homebrew/patch.rb index 53ea0ac6d..e1c5ad84b 100644 --- a/Library/Homebrew/patch.rb +++ b/Library/Homebrew/patch.rb @@ -66,8 +66,9 @@ class EmbeddedPatch def apply data = contents.gsub("HOMEBREW_PREFIX", HOMEBREW_PREFIX) - IO.popen("/usr/bin/patch -g 0 -f -#{strip}", "w") { |p| p.write(data) } - raise ErrorDuringExecution, "Applying DATA patch failed" unless $?.success? + cmd, args = "/usr/bin/patch", %W[-g 0 -f -#{strip}] + IO.popen("#{cmd} #{args.join(" ")}", "w") { |p| p.write(data) } + raise ErrorDuringExecution.new(cmd, args) unless $?.success? end def inspect |
