diff options
| author | Markus Reiter | 2016-10-01 23:18:13 +0200 |
|---|---|---|
| committer | Markus Reiter | 2016-10-02 19:53:43 +0200 |
| commit | 082bd5e98ae7592bc92466186609066e00c2bf84 (patch) | |
| tree | 6afaa394d36b9d21517a41e47264ffb9c63780f8 /Library/Homebrew/cask/lib/hbc/exceptions.rb | |
| parent | 564fa8867dd865c686d243ba48c202e0cb6a35fe (diff) | |
| download | brew-082bd5e98ae7592bc92466186609066e00c2bf84.tar.bz2 | |
Change `A Cask for #{token} is already installed.` message.
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/exceptions.rb')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/exceptions.rb | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/exceptions.rb b/Library/Homebrew/cask/lib/hbc/exceptions.rb index f77106d92..2f63366ca 100644 --- a/Library/Homebrew/cask/lib/hbc/exceptions.rb +++ b/Library/Homebrew/cask/lib/hbc/exceptions.rb @@ -29,13 +29,30 @@ module Hbc class CaskAlreadyInstalledError < AbstractCaskErrorWithToken def to_s - %Q{A Cask for #{token} is already installed. Add the "--force" option to force re-install.} + s = <<-EOS.undent + A Cask for #{token} is already installed. + EOS + + s.concat("\n").concat(reinstall_message) + end + + private + + def reinstall_message + <<-EOS.undent + To re-install #{token}, run: + brew cask uninstall --force #{token}; brew cask install #{token} + EOS end end - class CaskAutoUpdatesError < AbstractCaskErrorWithToken + class CaskAlreadyInstalledAutoUpdatesError < CaskAlreadyInstalledError def to_s - %Q{A Cask for #{token} is already installed and using auto-updates. Add the "--force" option to force re-install.} + s = <<-EOS.undent + A Cask for #{token} is already installed and using auto-updates. + EOS + + s.concat("\n").concat(reinstall_message) end end |
