diff options
| author | Markus Reiter | 2018-01-15 15:28:55 +0100 |
|---|---|---|
| committer | GitHub | 2018-01-15 15:28:55 +0100 |
| commit | f90e6f82c8f964365f85c9146aeb1811f6fc8b39 (patch) | |
| tree | af8f8cfd36d805f3047d7b5edc824b6a97444cce /Library | |
| parent | 85f7b04efe6fbfa8a2aceb4c54dd90b29d6dd4d2 (diff) | |
| parent | 8bf948482325bdc10ab7d0eff75ce0da4d5daf1c (diff) | |
| download | brew-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.rb | 2 |
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) |
