Use whoami consistently in chown commands

This commit is contained in:
Mike McQuaid 2019-05-22 10:18:56 +01:00
parent 2711d5f489
commit a89a3dfe91
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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