From 8e7c528d17c7cace23eb8f697c2501bf07eccc1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ram=C3=B3n=20S=C3=A1nchez=20Morales?= Date: Sun, 18 Jun 2023 11:05:53 +0200 Subject: [PATCH] chore(mac_brew_pkg): lint fixes and changelog add --- changelog/57946.fixed.md | 1 + salt/modules/mac_brew_pkg.py | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) create mode 100644 changelog/57946.fixed.md diff --git a/changelog/57946.fixed.md b/changelog/57946.fixed.md new file mode 100644 index 00000000000..c2ad189fa7f --- /dev/null +++ b/changelog/57946.fixed.md @@ -0,0 +1 @@ +Use brew path from which in mac_brew_pkg module and rely on _homebrew_bin() everytime diff --git a/salt/modules/mac_brew_pkg.py b/salt/modules/mac_brew_pkg.py index feb297136a4..dd45b4ab8cf 100644 --- a/salt/modules/mac_brew_pkg.py +++ b/salt/modules/mac_brew_pkg.py @@ -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