Fix PR issues
This commit is contained in:
parent
d81296f8dc
commit
299db98dbf
@ -26,7 +26,7 @@ module Homebrew
|
|||||||
"value for <version> is `v1`. See the docs for examples of using the JSON "\
|
"value for <version> is `v1`. See the docs for examples of using the JSON "\
|
||||||
"output: <https://docs.brew.sh/Querying-Brew>. "\
|
"output: <https://docs.brew.sh/Querying-Brew>. "\
|
||||||
"By default, this option treats all arguments as formulae. "\
|
"By default, this option treats all arguments as formulae. "\
|
||||||
"To treat arguments as casks, use the --cask-only option."
|
"To treat arguments as casks, use the --cask option."
|
||||||
switch "--fetch-HEAD",
|
switch "--fetch-HEAD",
|
||||||
description: "Fetch the upstream repository to detect if the HEAD installation of the "\
|
description: "Fetch the upstream repository to detect if the HEAD installation of the "\
|
||||||
"formula is outdated. Otherwise, the repository's HEAD will only be checked for "\
|
"formula is outdated. Otherwise, the repository's HEAD will only be checked for "\
|
||||||
@ -39,7 +39,7 @@ module Homebrew
|
|||||||
description: "Treat all arguments as casks"
|
description: "Treat all arguments as casks"
|
||||||
switch :debug
|
switch :debug
|
||||||
conflicts "--quiet", "--verbose", "--json"
|
conflicts "--quiet", "--verbose", "--json"
|
||||||
conflicts "--formula-only", "--cask-only"
|
conflicts "--formula", "--cask"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -54,12 +54,14 @@ module Homebrew
|
|||||||
formula_only = !args.cask?
|
formula_only = !args.cask?
|
||||||
end
|
end
|
||||||
|
|
||||||
if formula_only
|
outdated = if formula_only
|
||||||
formulae = args.resolved_formulae.blank? ? Formula.installed : args.resolved_formulae
|
formulae = args.resolved_formulae.presence || Formula.installed
|
||||||
outdated = print_outdated_formulae(formulae)
|
|
||||||
|
print_outdated_formulae(formulae)
|
||||||
elsif args.cask?
|
elsif args.cask?
|
||||||
casks = args.named.blank? ? Cask::Caskroom.casks : args.named
|
casks = args.named.presence || Cask::Caskroom.casks.presence
|
||||||
outdated = print_outdated_casks(casks)
|
|
||||||
|
print_outdated_casks(casks)
|
||||||
else
|
else
|
||||||
formulae, casks = args.resolved_formulae_casks
|
formulae, casks = args.resolved_formulae_casks
|
||||||
|
|
||||||
@ -68,7 +70,7 @@ module Homebrew
|
|||||||
casks = Cask::Caskroom.casks
|
casks = Cask::Caskroom.casks
|
||||||
end
|
end
|
||||||
|
|
||||||
outdated = print_outdated_formulae(formulae) + print_outdated_casks(casks)
|
print_outdated_formulae(formulae) + print_outdated_casks(casks)
|
||||||
end
|
end
|
||||||
|
|
||||||
Homebrew.failed = args.named.present? && outdated.present?
|
Homebrew.failed = args.named.present? && outdated.present?
|
||||||
|
|||||||
@ -94,7 +94,7 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return if outdated.empty?
|
return if outdated.blank?
|
||||||
|
|
||||||
pinned = outdated.select(&:pinned?)
|
pinned = outdated.select(&:pinned?)
|
||||||
outdated -= pinned
|
outdated -= pinned
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user