aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorenami tsugutomo2015-04-24 14:38:27 +0900
committerJack Nagel2015-04-24 20:31:19 -0400
commit0ec3717c247f1b3244a9ef38a1ea8b9a0146ce61 (patch)
tree6fe5cd230f76a42156141f724dfba0cba122ba4e
parent89dda9f0229f7d9da907848ba23b6ea9c4a4a920 (diff)
downloadhomebrew-0ec3717c247f1b3244a9ef38a1ea8b9a0146ce61.tar.bz2
Fix `brew unpack --patch`
Applying patches in `brew unpack` was broken since b76e26c9cf1f ("Decouple applying patches from staging the source"). Closes #38997. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
-rw-r--r--Library/Homebrew/cmd/unpack.rb12
1 files changed, 4 insertions, 8 deletions
diff --git a/Library/Homebrew/cmd/unpack.rb b/Library/Homebrew/cmd/unpack.rb
index afda67a88..fc9bf2f4b 100644
--- a/Library/Homebrew/cmd/unpack.rb
+++ b/Library/Homebrew/cmd/unpack.rb
@@ -2,12 +2,6 @@ require "stringio"
require "formula"
module Homebrew
- module UnpackPatch
- def patch
- super if ARGV.flag?("--patch")
- end
- end
-
def unpack
formulae = ARGV.formulae
raise FormulaUnspecifiedError if formulae.empty?
@@ -22,7 +16,6 @@ module Homebrew
raise "Cannot write to #{unpack_dir}" unless unpack_dir.writable_real?
formulae.each do |f|
- f.extend(UnpackPatch)
stage_dir = unpack_dir.join("#{f.name}-#{f.version}")
if stage_dir.exist?
@@ -33,7 +26,10 @@ module Homebrew
oh1 "Unpacking #{f.name} to: #{stage_dir}"
ENV['VERBOSE'] = '1' # show messages about tar
- f.brew { cp_r getwd, stage_dir }
+ f.brew do
+ f.patch if ARGV.flag?("--patch")
+ cp_r getwd, stage_dir
+ end
ENV['VERBOSE'] = nil
if ARGV.git?