Feel like I have to be missing something obvious here... but I can't seem to get this to behave. Trying to make an extension attribute that checks if homebrew is installed, and outputs the result of "which brew" if so.... pretty basic. This works perfectly from terminal both as my standard user and as root... but when jamf runs it... all that's returned to the extension attribute is "Installed: " with no file path listed.
From terminal, i get what seems to be a proper output jamf should be happy with:
sh-3.2# ./test2.sh
<result>Installed: /opt/homebrew/bin/brew</result>
Extension Attribute Code:
#!/bin/bash
if [[ $(which brew) != "brew not found" ]]; then
brewstatus="Installed: $(which brew)"
else
brewstatus="Not installed"
fi
echo "<result>$brewstatus</result>"
exit 0