diff options
| author | Markus Reiter | 2016-11-28 13:55:51 +0100 |
|---|---|---|
| committer | Markus Reiter | 2016-11-28 14:01:06 +0100 |
| commit | e63efb3fe48523d1a24bb5d2771af73fa74dca6b (patch) | |
| tree | 52b4004431b849f9d7ab1cf0bc1d0a3ed23d7b85 /Library/Homebrew/cask/lib | |
| parent | 9a29bd35e6d6e1a446c02b14d43b6dd52733821e (diff) | |
| download | brew-e63efb3fe48523d1a24bb5d2771af73fa74dca6b.tar.bz2 | |
Warn when overwriting an artifact.
Diffstat (limited to 'Library/Homebrew/cask/lib')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/artifact/moved.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/artifact/moved.rb b/Library/Homebrew/cask/lib/hbc/artifact/moved.rb index 7322924e8..64756fd93 100644 --- a/Library/Homebrew/cask/lib/hbc/artifact/moved.rb +++ b/Library/Homebrew/cask/lib/hbc/artifact/moved.rb @@ -42,11 +42,8 @@ module Hbc def preflight_checks if Utils.path_occupied?(target) - if force - ohai(warning_target_exists { |s| s << "overwriting." }) - else - raise CaskError, warning_target_exists << "." - end + raise CaskError, warning_target_exists << "." unless force + opoo(warning_target_exists { |s| s << "overwriting." }) end unless source.exist? message = "It seems the #{self.class.artifact_english_name} source is not there: '#{source}'" |
