aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcommitay2018-01-13 20:54:17 +1000
committercommitay2018-01-13 21:31:00 +1000
commit8bf948482325bdc10ab7d0eff75ce0da4d5daf1c (patch)
tree17742a7bbaf50aa30a3e8fb0c0fe450333dee954
parent651988bf5538c78d4a81428ea4153baf6c4b0318 (diff)
downloadbrew-8bf948482325bdc10ab7d0eff75ce0da4d5daf1c.tar.bz2
cask moved: check target writable for move_back
-rw-r--r--Library/Homebrew/cask/lib/hbc/artifact/moved.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/artifact/moved.rb b/Library/Homebrew/cask/lib/hbc/artifact/moved.rb
index f5ef790eb..856ab2766 100644
--- a/Library/Homebrew/cask/lib/hbc/artifact/moved.rb
+++ b/Library/Homebrew/cask/lib/hbc/artifact/moved.rb
@@ -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)