outdated: Fail when user supplies formulae and some are outdated
This commit is contained in:
parent
a3da9fa350
commit
966131f768
@ -53,13 +53,9 @@ module Homebrew
|
||||
if args.formula_only? || !args.cask_only? && args.json
|
||||
formulae = args.resolved_formulae.blank? ? Formula.installed : args.resolved_formulae
|
||||
outdated = print_outdated_formulae(formulae)
|
||||
|
||||
Homebrew.failed = !formulae.blank? && !outdated.blank?
|
||||
elsif args.cask_only?
|
||||
casks = args.named.blank? ? Cask::Caskroom.casks : args.named
|
||||
outdated = print_outdated_casks(casks)
|
||||
|
||||
Homebrew.failed = !casks.blank? && !outdated.blank?
|
||||
else
|
||||
formulae, casks = args.resolved_formulae_casks
|
||||
|
||||
@ -68,11 +64,10 @@ module Homebrew
|
||||
casks = Cask::Caskroom.casks
|
||||
end
|
||||
|
||||
outdated_formulae = print_outdated_formulae(formulae)
|
||||
outdated_casks = print_outdated_casks(casks)
|
||||
|
||||
Homebrew.failed = !formulae.blank? && !outdated_formulae.blank? || !casks.blank? && !outdated_casks.blank?
|
||||
outdated = print_outdated_formulae(formulae) + print_outdated_casks(casks)
|
||||
end
|
||||
|
||||
Homebrew.failed = args.named.present? && outdated.present?
|
||||
end
|
||||
|
||||
def print_outdated_formulae(formulae)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user