diff options
| author | Jack Nagel | 2014-09-18 20:32:50 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2014-09-18 20:32:50 -0500 | 
| commit | 56dd575f9603a75015fbdd4a7d7daea0c34a2cb9 (patch) | |
| tree | 342b61b5f2fb544a62686d5f95712005efb705ba /Library/Homebrew/patch.rb | |
| parent | 7a4e2fe24dd29d5f8780d494975509d3de39eed9 (diff) | |
| download | brew-56dd575f9603a75015fbdd4a7d7daea0c34a2cb9.tar.bz2 | |
Pass command and arg list into ErrorDuringExecution constructor
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 | 
