Skip to content

Commit

Permalink
doctor: check /usr/local for writablity
Browse files Browse the repository at this point in the history
- Airfoil during the install of InstantOn changes /usr/local to
  root:wheel ownership

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
  • Loading branch information
leshill authored and adamv committed Jun 19, 2011
1 parent 97ac9b4 commit 166b199
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Library/Homebrew/cmd/doctor.rb
Expand Up @@ -240,6 +240,24 @@ def __check_subdir_access base
end
end

def check_access_usr_local
return unless HOMEBREW_PREFIX.to_s == '/usr/local'

unless Pathname('/usr/local').writable?
puts <<-EOS.undent
The /usr/local directory is not writable.
Even if this folder was writable when you installed Homebrew, other
software may change permissions on this folder. Some versions of the
"InstantOn" component of Airfoil are known to do this.
You should probably change the ownership and permissions of /usr/local
back to your user account.
EOS
end
end

def check_access_share_locale
__check_subdir_access 'share/locale'
end
Expand Down Expand Up @@ -721,6 +739,7 @@ def doctor
check_for_other_package_managers
check_for_x11
check_for_nonstandard_x11
check_access_usr_local
check_access_include
check_access_etc
check_access_share
Expand Down

0 comments on commit 166b199

Please sign in to comment.