Upgrade an outdated Cask just by name, no need for --greedy
This commit is contained in:
parent
c9b5de4cab
commit
7ce4319012
@ -12,7 +12,7 @@ module Hbc
|
||||
end
|
||||
|
||||
def run
|
||||
outdated_casks = casks(alternative: -> { Hbc.installed }).select { |cask| cask.outdated?(greedy?) }
|
||||
outdated_casks = casks(alternative: -> { Hbc.installed }).select { |cask| cask.outdated?(greedy?) || (args.include?(cask.token) && cask.outdated?(true)) }
|
||||
|
||||
if outdated_casks.empty?
|
||||
oh1 "No Casks to upgrade"
|
||||
|
||||
@ -76,7 +76,7 @@ describe Hbc::CLI::Upgrade, :cask do
|
||||
expect(Hbc::CaskLoader.load("local-transmission").versions).to include("2.60")
|
||||
end
|
||||
|
||||
it 'and ignores "auto_updates" and "latest" Casks even when their tokens are provided in the command line' do
|
||||
it 'but updates "auto_updates" and "latest" Casks when their tokens are provided in the command line' do
|
||||
expect(Hbc::CaskLoader.load("local-caffeine")).to be_installed
|
||||
expect(Hbc.appdir.join("Caffeine.app")).to be_a_directory
|
||||
expect(Hbc::CaskLoader.load("local-caffeine").versions).to include("1.2.2")
|
||||
@ -93,7 +93,7 @@ describe Hbc::CLI::Upgrade, :cask do
|
||||
|
||||
expect(Hbc::CaskLoader.load("auto-updates")).to be_installed
|
||||
expect(Hbc.appdir.join("MyFancyApp.app")).to be_a_directory
|
||||
expect(Hbc::CaskLoader.load("auto-updates").versions).to include("2.57")
|
||||
expect(Hbc::CaskLoader.load("auto-updates").versions).to include("2.61")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user