diff options
| author | Adam Vandenberg | 2012-02-25 12:04:36 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2012-02-25 17:24:45 -0800 |
| commit | 3e2af8de39b5161b885adc139ce61149352f2af5 (patch) | |
| tree | 44517bcff75a7881e5d6aa8ef1d2e0ec782f7a01 /Library | |
| parent | 43116ee6fe717c625aa1180c5c65d457100e5bb1 (diff) | |
| download | homebrew-3e2af8de39b5161b885adc139ce61149352f2af5.tar.bz2 | |
Only call patches once
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index fe9598b25..f1f6607e2 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -586,13 +586,17 @@ EOF end def patch - return if patches.nil? + # Only call `patches` once. + # If there is code in `patches`, which is not recommended, we only + # want to run that code once. + the_patches = patches + return if the_patches.nil? - if not patches.kind_of? Hash + if not the_patches.kind_of? Hash # We assume -p1 - patch_defns = { :p1 => patches } + patch_defns = { :p1 => the_patches } else - patch_defns = patches + patch_defns = the_patches end patch_list=[] |
