Add warnings for permission exceptions.
This commit is contained in:
parent
e0e750e458
commit
dca5dc8176
@ -199,9 +199,17 @@ module Homebrew
|
||||
target = HOMEBREW_CACHE/"#{prefix}--#{suffix}"
|
||||
|
||||
if target.exist?
|
||||
begin
|
||||
FileUtils.rm_rf child
|
||||
rescue Errno::EACCES
|
||||
opoo "Could not remove #{child}, please do so manually."
|
||||
end
|
||||
else
|
||||
FileUtils.mv child, target, force: true
|
||||
begin
|
||||
FileUtils.mv child, target
|
||||
rescue Errno::EACCES
|
||||
opoo "Could not move #{child} to #{target}, please do so manually."
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user