Add error message with instructions for the missing cask file
This commit is contained in:
parent
d7b1f19700
commit
0fd1be9a8e
@ -146,7 +146,17 @@ module Cask
|
|||||||
|
|
||||||
caught_exceptions = []
|
caught_exceptions = []
|
||||||
|
|
||||||
upgradable_casks = outdated_casks.map { |c| [CaskLoader.load(c.installed_caskfile), c] }
|
upgradable_casks = outdated_casks.map do |c|
|
||||||
|
if !c.installed_caskfile.exist? && c.tap.to_s == "homebrew/cask" &&
|
||||||
|
Homebrew::API::Cask.all_casks.key?(c.token)
|
||||||
|
odie <<~EOS
|
||||||
|
The cask '#{c.token}' was not properly installed and cannot be upgraded. To fix this, run:
|
||||||
|
brew reinstall --cask --force #{c.token}
|
||||||
|
EOS
|
||||||
|
end
|
||||||
|
|
||||||
|
[CaskLoader.load(c.installed_caskfile), c]
|
||||||
|
end
|
||||||
|
|
||||||
puts upgradable_casks
|
puts upgradable_casks
|
||||||
.map { |(old_cask, new_cask)| "#{new_cask.full_name} #{old_cask.version} -> #{new_cask.version}" }
|
.map { |(old_cask, new_cask)| "#{new_cask.full_name} #{old_cask.version} -> #{new_cask.version}" }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user