keg: tell people what command will remove keg.

This will work regardless of permissions.
This commit is contained in:
Mike McQuaid 2019-05-22 10:19:20 +01:00
parent a89a3dfe91
commit 8908dc51d6
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -311,7 +311,10 @@ class Keg
remove_old_aliases
remove_oldname_opt_record
rescue Errno::ENOTEMPTY
ofail "Could not remove #{path}! Check its permissions."
odie <<~EOS
Could not remove #{name} keg! Do so manually:
sudo rm -rf #{path}
EOS
end
def unlink(mode = OpenStruct.new)