chore(mac_brew_pkg): lint fixes and changelog add

This commit is contained in:
Antonio Ramón Sánchez Morales 2023-06-18 11:05:53 +02:00 committed by Megan Wilhite
parent 4fddd04ed2
commit 8e7c528d17
2 changed files with 2 additions and 3 deletions

1
changelog/57946.fixed.md Normal file
View file

@ -0,0 +1 @@
Use brew path from which in mac_brew_pkg module and rely on _homebrew_bin() everytime

View file

@ -100,9 +100,7 @@ def _homebrew_bin():
# Fetch PATH binary brew full path eg: /usr/local/bin/brew (symbolic link)
brew = salt.utils.path.which("brew")
# Fetch and ret brew installation folder full path eg: /opt/homebrew/bin/brew
ret = __salt__["cmd.run"](
f"{brew} --prefix", output_loglevel="trace"
)
ret = __salt__["cmd.run"](f"{brew} --prefix", output_loglevel="trace")
ret += "/bin/brew"
return ret