diff --git a/Library/Homebrew/cask/cmd/doctor.rb b/Library/Homebrew/cask/cmd/doctor.rb index ddd033a2e1..0a6a015bba 100644 --- a/Library/Homebrew/cask/cmd/doctor.rb +++ b/Library/Homebrew/cask/cmd/doctor.rb @@ -67,7 +67,7 @@ module Cask if path.exist? && !path.writable? add_error "The staging path #{user_tilde(path.to_s)} is not writable by the current user." - add_error "To fix, run \'sudo chown -R ${USER}:staff #{user_tilde(path.to_s)}'" + add_error "To fix, run \'sudo chown -R $(whoami):staff #{user_tilde(path.to_s)}'" end puts user_tilde(path.to_s) diff --git a/docs/Gems,-Eggs-and-Perl-Modules.md b/docs/Gems,-Eggs-and-Perl-Modules.md index 8fafd9655a..9b6bd42308 100644 --- a/docs/Gems,-Eggs-and-Perl-Modules.md +++ b/docs/Gems,-Eggs-and-Perl-Modules.md @@ -116,7 +116,7 @@ If you ever did a `sudo gem`, etc. before then a lot of files will have been created owned by root. Fix with: ```sh -sudo chown -R $USER /Library/Ruby /Library/Perl /Library/Python +sudo chown -R $(whoami) /Library/Ruby /Library/Perl /Library/Python ``` ## Perl CPAN modules without sudo