aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorJack Nagel2013-01-07 17:50:23 -0600
committerJack Nagel2013-01-08 11:03:13 -0600
commit30dc1bea9adae95d5c19045ffc3d67cc8b1e1eea (patch)
tree9827388e4ac48ac49fd64e63da8b81ae7ff94e1e /Library/Homebrew/cmd
parent3a8e95c5260d6615c0795a75084dcd447a630583 (diff)
downloadhomebrew-30dc1bea9adae95d5c19045ffc3d67cc8b1e1eea.tar.bz2
Prune LinkedKegs relative to correct path
Fixes #16948.
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/doctor.rb2
-rw-r--r--Library/Homebrew/cmd/prune.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 752f80930..76f35bb12 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -202,7 +202,7 @@ end
def check_for_broken_symlinks
require 'keg'
broken_symlinks = []
- Keg::PRUNEABLE_DIRECTORIES.map { |d| HOMEBREW_PREFIX/d }.each do |d|
+ Keg::PRUNEABLE_DIRECTORIES.each do |d|
next unless d.directory?
d.find do |pn|
broken_symlinks << pn if pn.symlink? and pn.readlink.expand_path.to_s =~ /^#{HOMEBREW_PREFIX}/ and not pn.exist?
diff --git a/Library/Homebrew/cmd/prune.rb b/Library/Homebrew/cmd/prune.rb
index 394b8ad7f..29e57ee3e 100644
--- a/Library/Homebrew/cmd/prune.rb
+++ b/Library/Homebrew/cmd/prune.rb
@@ -9,7 +9,7 @@ module Homebrew extend self
$d = 0
dirs = []
- Keg::PRUNEABLE_DIRECTORIES.map{ |d| HOMEBREW_PREFIX/d }.each do |path|
+ Keg::PRUNEABLE_DIRECTORIES.each do |path|
next unless path.directory?
path.find do |path|
path.extend ObserverPathnameExtension