diff --git a/Library/Homebrew/cask/lib/hbc/artifact/symlinked.rb b/Library/Homebrew/cask/lib/hbc/artifact/symlinked.rb index 69b388425ebcd4f5a2c9efc7021f37c782c180fd..2cd172ad3eb58c6f4a3f56d099c82a1cd40d73c5 100644 --- a/Library/Homebrew/cask/lib/hbc/artifact/symlinked.rb +++ b/Library/Homebrew/cask/lib/hbc/artifact/symlinked.rb @@ -39,8 +39,7 @@ module Hbc def preflight_checks(source, target) if target.exist? && !self.class.islink?(target) - opoo "It seems there is already #{self.class.artifact_english_article} #{self.class.artifact_english_name} at '#{target}'; not linking." - return false + raise CaskError, "It seems there is already #{self.class.artifact_english_article} #{self.class.artifact_english_name} at '#{target}'; not linking." end unless source.exist? raise CaskError, "It seems the #{self.class.link_type_english_name.downcase} source is not there: '#{source}'"