Skip to content
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

homebrew: allow setting greedy for all casks by default #1382

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

water-sucks
Copy link

Specifying the --greedy flag with brew upgrade for each cask has to be done on an opt-in basis for each cask specified in homebrew.casks, which can be rather tedious.

This adds an option called homebrew.greedyCasks that sets the default value for the homebrew.casks.*.greedy option, so that all casks can be changed to be greedy at once, without needing to set that option for each cask. Opting out of --greedy by setting it to false per-cask when using this option is possible as well.

Closes #572, #1201.

Comment on lines +505 to +506
greedy = mkOption {
type = types.nullOr types.bool;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There’s also --greedy-latest and --greedy-auto-updates, maybe this should be an enum?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK the options in this module are is just for Brewfile generation options, rather than being command-line parameters.

The only parameter I know that is possible to pass in regards to greediness of a cask is the boolean greedy: true option, so I would think it's better to not use an enum here and just stick to the boolean. I could be wrong about this tho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow setting greedy for all casks
2 participants