aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMarkus Reiter2018-01-15 15:28:55 +0100
committerGitHub2018-01-15 15:28:55 +0100
commitf90e6f82c8f964365f85c9146aeb1811f6fc8b39 (patch)
treeaf8f8cfd36d805f3047d7b5edc824b6a97444cce /Library
parent85f7b04efe6fbfa8a2aceb4c54dd90b29d6dd4d2 (diff)
parent8bf948482325bdc10ab7d0eff75ce0da4d5daf1c (diff)
downloadbrew-f90e6f82c8f964365f85c9146aeb1811f6fc8b39.tar.bz2
Merge pull request #3680 from commitay/moved-permissions
cask moved: check target writable for move_back
Diffstat (limited to 'Library')
-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)