Merge pull request #3680 from commitay/moved-permissions
cask moved: check target writable for move_back
This commit is contained in:
commit
f90e6f82c8
@ -65,7 +65,7 @@ module Hbc
|
||||
ohai "Moving #{self.class.english_name} '#{target.basename}' back to '#{source}'."
|
||||
source.dirname.mkpath
|
||||
|
||||
if source.parent.writable?
|
||||
if target.parent.writable?
|
||||
FileUtils.move(target, source)
|
||||
else
|
||||
command.run("/bin/mv", args: [target, source], sudo: true)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user