Use --json=v2 for listing macOS brew casks
What does this PR do?
It simplifies and improves support for listing macOS brew casks.
Since Homebrew 2.6.0 (Homebrew/brew#8899), all brew cask commands have been deprecated in favour of brew commands (with --cask) when necessary. So now, any cask from official taps can be installed/removed without specifying its corresponding tap.
For example:
visual-studio-code:
pkg.installed
can be used for installing VS Code instead of using:
homebrew/cask/visual-studio-code:
pkg.installed
This PR also adds support for listing casks upgrades (mac_brew.list_upgrades(include_casks=True)) and getting casks info (mac_brew.info_installed("cask_name"))
Merge requirements satisfied?
- [x] Changelog - https://docs.saltstack.com/en/master/topics/development/changelog.html
- [x] Tests written/updated
- [x] Requires PR homebrew/brew#10540
Commits signed with GPG?
Yes
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.
This PR closes #24653
Please @twangboy, tell me if something is wrong with this issue. I created it more than 1 month ago and no one has commented or approved it.
Please @twangboy, tell me if something is wrong with this issue. I created it more than 1 year ago and no one has commented or approved it.
Excuse me for adding you to this PR @weswhet, but this PR has been open for over a year and no one has approved it or asked for changes.
Could you review it, please?
Hey, @cdalvaro can you bring it up to date with master? otherwise it looks good to me. @garethgreenaway @s0undt3ch could you have a look at this since I don't have permission to approve it.
Done! Many thanks @weswhet for reviewing it!
This PR needs to be rebased due to conflicts.
Could you take care of it @cdalvaro please?
Due to some directory changes for the file test_mac_brew_pkg.py I think I have lost some tests.
I'm working on recovering them...
I think I have recovered all of them ... Tests will fail if I have forgotten something 🤞
Done! I think that CI failures are not related with my changes
Could this PR be merged for the next salt release, please?
1.5 years since this PR was created
Please @Ch3LL, could you review this PR?
Thanks @Ch3LL !!