diff options
| author | Markus Reiter | 2017-08-05 15:56:34 +0200 |
|---|---|---|
| committer | Markus Reiter | 2017-08-05 16:19:50 +0200 |
| commit | 67327c75b56cbf9ab8a506879846118b9d3526ab (patch) | |
| tree | d657f1edb45cb3691ed2d96f1667baeb3eff00c3 /Library/Homebrew/cask/lib/hbc/exceptions.rb | |
| parent | 42cfb6d238b7b37b8114e9d0c988bc8e47c5c604 (diff) | |
| download | brew-67327c75b56cbf9ab8a506879846118b9d3526ab.tar.bz2 | |
Implement `conflicts_with :cask`.
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/exceptions.rb')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/exceptions.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/exceptions.rb b/Library/Homebrew/cask/lib/hbc/exceptions.rb index 1a246be65..f7f9e43b6 100644 --- a/Library/Homebrew/cask/lib/hbc/exceptions.rb +++ b/Library/Homebrew/cask/lib/hbc/exceptions.rb @@ -17,6 +17,19 @@ module Hbc end end + class CaskConflictError < AbstractCaskErrorWithToken + attr_reader :conflicting_cask + + def initialize(token, conflicting_cask) + super(token) + @conflicting_cask = conflicting_cask + end + + def to_s + "Cask '#{token}' conflicts with '#{conflicting_cask}'." + end + end + class CaskUnavailableError < AbstractCaskErrorWithToken def to_s "Cask '#{token}' is unavailable" << (reason.empty? ? "." : ": #{reason}") |
