-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/outdated: display warning for disabled casks #17124
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,6 +78,7 @@ | |
end | ||
|
||
print_outdated(outdated) | ||
print_disabled(disabled_casks) | ||
end | ||
|
||
Homebrew.failed = args.named.present? && outdated.present? | ||
|
@@ -123,6 +124,13 @@ | |
end | ||
end | ||
|
||
def print_disabled(casks) | ||
casks.each do |cask| | ||
opoo "#{cask.token} is #{DeprecateDisable.message(cask)}" | ||
end | ||
puts "Consider looking for alternatives, as they will be removed from Homebrew soon." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to handle this (and probably also the |
||
end | ||
|
||
def json_info(formulae_or_casks) | ||
formulae_or_casks.map do |formula_or_cask| | ||
if formula_or_cask.is_a?(Formula) | ||
|
@@ -177,6 +185,14 @@ | |
end | ||
end | ||
|
||
def disabled_casks | ||
if args.named.present? | ||
select_disabled(args.named.to_casks) | ||
else | ||
select_disabled(Cask::Caskroom.casks) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you use |
||
end | ||
end | ||
|
||
def outdated_formulae_casks | ||
formulae, casks = args.named.to_resolved_formulae_to_casks | ||
|
||
|
@@ -198,6 +214,10 @@ | |
end | ||
end | ||
end | ||
|
||
def select_disabled(casks) | ||
casks.select(&:disabled?) | ||
end | ||
end | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned: if we output casks here: we should also output formulae. May also want to think about how
--json
is handled.