Open AliSoftware opened 8 months ago
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
cc @Akasurde @danieljaouen @indrajitr @kyleabenson @martinm82 click here for bot help
!component =plugins/modules/homebrew.py
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
cc @andrew-d click here for bot help
CC @joao-victor-silva
Summary
Before https://github.com/ansible-collections/community.general/pull/7870 landed, providing a full
name
(that contains/
) for a formula to install viacommunity.general.homebrew
worked without any issue, and automatically installed the corresponding tap first if needed (like e.g. thebrew install buildkite/buildkite/buildkite-agent
command line would).But since that change, the plugin now crashes when trying to call
brew info --json=v2 {{name}}
here as, in such cases, that command would error with:This is a change in behavior that is a bit unfortunate and broke a couple of our playbooks.
PS: Even if we can kinda work around it by adding
community.general.homebrew_tap
in our playbook before callingcommunity.general.homebrew
, that means we'd have to do the work of extracting the tap name from the fullname
string we pass in our playbooks; this was not necessary before, and could become cumbersome to do it ourselves (in our playbook, as opposed to have the plugin do it and keep the previous behavior) especially if we passed multiple formulae with compound names as part of thename
attribute, or when the brew formulas we want our playbook to install are provided more dynamically or via external variables.Issue Type
Bug Report
Component Name
homebrew
Ansible Version
Community.general Version
Configuration
OS / Environment
macOS 14.3.1
Steps to Reproduce
Or with some dynamic values
Expected Results
The fomulae gets installed or updated even if they are provided with their full name (tap+name) and the tap has not been installed yet on the target machine—just like before that recent change, or like when running
brew install
from the command line.Actual Results
JSON parsing failure — due to
brew info --json=v2
erroring if passed a full formula name while the tap it belongs to wasn't installed yet.Code of Conduct