aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorDominyk Tiller2015-10-30 18:42:19 +0000
committerDominyk Tiller2015-10-30 18:42:19 +0000
commit8acac5aa713a271edb23d88ef19140b3a39e969f (patch)
tree7e140d24f5224bbadc04860c761e7449f8b9ec65 /Library
parenta2e2553bd82ca130931072353a167be5d9e87a20 (diff)
downloadbrew-8acac5aa713a271edb23d88ef19140b3a39e969f.tar.bz2
doctor: unify chown messages
Closes Homebrew/homebrew#45398.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/doctor.rb43
1 files changed, 31 insertions, 12 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 6423abe0b..90d718ba8 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -408,11 +408,12 @@ class Checks
return if cant_read.empty?
inject_file_list cant_read.sort, <<-EOS.undent
- Some directories in #{target} aren't writable.
- This can happen if you "sudo make install" software that isn't managed
- by Homebrew. If a brew tries to add locale information to one of these
- directories, then the install will fail during the link step.
- You should probably `chown` them:
+ Some directories in #{target} aren't writable.
+ This can happen if you "sudo make install" software that isn't managed
+ by Homebrew. If a brew tries to add locale information to one of these
+ directories, then the install will fail during the link step.
+
+ You should probably `sudo chown -R $(whoami)` them:
EOS
end
@@ -427,7 +428,10 @@ class Checks
def check_access_homebrew_repository
unless HOMEBREW_REPOSITORY.writable_real? then <<-EOS.undent
The #{HOMEBREW_REPOSITORY} is not writable.
- You should probably `chown` #{HOMEBREW_REPOSITORY}
+
+ You should probably change the ownership and permissions of #{HOMEBREW_REPOSITORY}
+ back to your user account.
+ sudo chown -R $(whoami) #{HOMEBREW_REPOSITORY}
EOS
end
end
@@ -467,7 +471,9 @@ class Checks
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.
- You should probably `chown` #{dir}
+ You should probably change the ownership and permissions of #{dir}
+ back to your user account.
+ sudo chown -R $(whoami) #{dir}
EOS
end
end
@@ -481,7 +487,9 @@ class Checks
by Homebrew. If you install a formula with Python modules, the install
will fail during the link step.
- You should probably `chown` #{Language::Python.homebrew_site_packages}
+ You should probably change the ownership and permissions of #{Language::Python.homebrew_site_packages}
+ back to your user account.
+ sudo chown -R $(whoami) #{Language::Python.homebrew_site_packages}
EOS
end
end
@@ -491,7 +499,10 @@ class Checks
<<-EOS.undent
#{HOMEBREW_LOGS} isn't writable.
Homebrew writes debugging logs to this location.
- You should probably `chown` #{HOMEBREW_LOGS}
+
+ You should probably change the ownership and permissions of #{HOMEBREW_LOGS}
+ back to your user account.
+ sudo chown -R $(whoami) #{HOMEBREW_LOGS}
EOS
end
end
@@ -502,7 +513,10 @@ class Checks
#{HOMEBREW_CACHE} isn't writable.
This can happen if you run `brew install` or `brew fetch` as another user.
Homebrew caches downloaded files to this location.
- You should probably `chown` #{HOMEBREW_CACHE}
+
+ You should probably change the ownership and permissions of #{HOMEBREW_CACHE}
+ back to your user account.
+ sudo chown -R $(whoami) #{HOMEBREW_CACHE}
EOS
end
end
@@ -511,7 +525,10 @@ class Checks
if HOMEBREW_CELLAR.exist? && !HOMEBREW_CELLAR.writable_real?
<<-EOS.undent
#{HOMEBREW_CELLAR} isn't writable.
- You should `chown` #{HOMEBREW_CELLAR}
+
+ You should probably change the ownership and permissions of #{HOMEBREW_CELLAR}
+ back to your user account.
+ sudo chown -R $(whoami) #{HOMEBREW_CELLAR}
EOS
end
end
@@ -521,7 +538,9 @@ class Checks
if opt.exist? && !opt.writable_real?
<<-EOS.undent
#{opt} isn't writable.
- You should `chown` #{opt}
+ You should probably change the ownership and permissions of #{opt}
+ back to your user account.
+ sudo chown -R $(whoami) #{opt}
EOS
end
end