diff options
| author | L. E. Segovia | 2017-11-24 00:48:14 +0000 |
|---|---|---|
| committer | L. E. Segovia | 2017-11-24 00:48:14 +0000 |
| commit | 7ee98eb421380afd45144ef8df1656cb22d4bb66 (patch) | |
| tree | 277ff9a58fbaf5433d862fbef8230fa983438e2a /Library/Homebrew/cask/lib | |
| parent | 7ce43190129378ebb6f46d0a77bd1891bef8c9ad (diff) | |
| download | brew-7ee98eb421380afd45144ef8df1656cb22d4bb66.tar.bz2 | |
Implement more of @reitermarkus's comments
- Simplify outdated Casks checks
- Make use of RSpec's let(:) and .and syntax
Diffstat (limited to 'Library/Homebrew/cask/lib')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli/upgrade.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/upgrade.rb b/Library/Homebrew/cask/lib/hbc/cli/upgrade.rb index a6c679142..b567f6d20 100644 --- a/Library/Homebrew/cask/lib/hbc/cli/upgrade.rb +++ b/Library/Homebrew/cask/lib/hbc/cli/upgrade.rb @@ -12,7 +12,8 @@ module Hbc end def run - outdated_casks = casks(alternative: -> { Hbc.installed }).select { |cask| cask.outdated?(greedy?) || (args.include?(cask.token) && cask.outdated?(true)) } + outdated_casks = casks(alternative: -> { Hbc.installed.select { |cask| + cask.outdated?(greedy?) } }).select { |cask| cask.outdated?(true) } if outdated_casks.empty? oh1 "No Casks to upgrade" |
