fix(mac_brew_pkg): Use format instead of + operator

Fix for https://github.com/saltstack/salt/actions/runs/5298983857/jobs/9593610712?pr=57946

Signed-off-by: Antonio Ramón Sánchez Morales <antonioramonsm@gmail.com>
This commit is contained in:
Antonio Ramón Sánchez Morales 2023-06-18 10:36:55 +02:00 committed by Megan Wilhite
parent b258510a6d
commit 4fddd04ed2

View file

@ -97,8 +97,11 @@ def _homebrew_bin():
"""
Returns the full path to the homebrew binary in the PATH
"""
# 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"](
salt.utils.path.which("brew") + " --prefix", output_loglevel="trace"
f"{brew} --prefix", output_loglevel="trace"
)
ret += "/bin/brew"
return ret