From bcde6432f3b7e42870ee4b3ee7a6eb06021c62e7 Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Sat, 28 Jul 2012 11:36:08 -0700 Subject: Fix issues with writable? detection in brew doctor Closes Homebrew/homebrew#13689. Signed-off-by: Max Howell There are subtle distinctions between writable? and writable_real? we don't understand precisely why we need this, but it fixes the bugs :/ --- Library/Homebrew/extend/pathname.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Library/Homebrew/extend') diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 14d902880..da0f641cb 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -353,7 +353,7 @@ class Pathname To list all files that would be deleted: brew link -n formula_name EOS - elsif !dirname.writable? + elsif !dirname.writable_real? raise <<-EOS.undent Could not symlink file: #{src.expand_path} #{dirname} is not writable. You should change its permissions. @@ -375,7 +375,7 @@ class Pathname def ensure_writable saved_perms = nil - unless writable? + unless writable_real? saved_perms = stat.mode chmod 0644 end -- cgit v1.2.3