diff options
| author | Jack Nagel | 2014-07-31 15:54:03 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2014-07-31 15:58:03 -0500 | 
| commit | 4a3c594358122b0c558de25d20041773d4b5cced (patch) | |
| tree | 7821cc80135e7e1cba8356106d6f5bb6fb8f66e8 /Library/Homebrew/cmd/update.rb | |
| parent | 41a972726cb34be68b0c995f372df083b2f7453c (diff) | |
| download | homebrew-4a3c594358122b0c558de25d20041773d4b5cced.tar.bz2 | |
Handle tap file renames that remove a file from the formula directory
Diffstat (limited to 'Library/Homebrew/cmd/update.rb')
| -rw-r--r-- | Library/Homebrew/cmd/update.rb | 11 | 
1 files changed, 6 insertions, 5 deletions
diff --git a/Library/Homebrew/cmd/update.rb b/Library/Homebrew/cmd/update.rb index 5e7f34b62..467cc60f6 100644 --- a/Library/Homebrew/cmd/update.rb +++ b/Library/Homebrew/cmd/update.rb @@ -174,16 +174,17 @@ class Updater      if initial_revision && initial_revision != current_revision        diff.each_line do |line|          status, *paths = line.split +        src, dst = paths.first, paths.last -        next unless File.extname(paths.last) == ".rb" -        next unless File.dirname(paths.last) == formula_directory +        next unless File.extname(dst) == ".rb" +        next unless paths.any? { |p| File.dirname(p) == formula_directory }          case status          when "A", "M", "D" -          map[status.to_sym] << repository.join(paths.first) +          map[status.to_sym] << repository.join(src)          when /^R\d{0,3}/ -          map[:D] << repository.join(paths.first) -          map[:A] << repository.join(paths.last) +          map[:D] << repository.join(src) if File.dirname(src) == formula_directory +          map[:A] << repository.join(dst) if File.dirname(dst) == formula_directory          end        end      end  | 
