-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Use brew path from which in mac_brew_pkg module #57946
Conversation
ad35e5a
to
db228b3
Compare
Hi, I've reopened this PR since a long time ago without using salt with macos, I've realised that I'm experiencing the same error behaviour when trying to pkg.install something with brew on macos:
This is reproduced with latest released (3006.1) salt-master & salt-minion on macOS Ventura (also latest) with a just installed homebrew. |
Congratulations on your first PR being merged! 🎉 |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
Call brew directly to fetch brew full path will throw command not found
error. Fetching with which as in other parts of module code works fine.
What does this PR do?
I checked a bit deeply and I see that, as @Ch3LL explain at PR #48804, after this fix #47212 we aren't passing the PATH via the env anymore so we need to run which brew to get the entire path or else we see this error. So call brew directly to fetch brew full path will throw previous error, and I think that a valid solution can be fetch full path as @Ch3LL proposes in the past.
What issues does this PR fix or reference?
Related with previously merged PR #48804. See saltstack/salt-ci-images#1033 conversation for details.
Previous Behavior
I was getting the following error trying to run 'salt pkg.install wget':
New Behavior
Command 'salt pkg.install wget' runs well and do his work.
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes