Hi,
I'm running a script from Jamf that pulls a gitlab repo then executes a script from said repo that installs some packages leveraging brew install. The script works nicely on the intel laptop but not on M1
The error showing in Jamf should the script executed other parts of the script but fails when calling brew.
install.sh: line 10: brew: command not found
If I run sh install.sh locally via terminal it works well. If I run brew in either bash to zsh it finds the command.
What could be occuring differently when executing the script via Jamf Self Service that means it's completely oblivious to the brew installation?
Jamf Script Snippet
#!usr/bin/env bash
#Get loggedInUser name
loggedInUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name 😕😕 && ! /loginwindow/ { print $3 }' )
#Execute script under loggedInUser
#sudo -u "$loggedInUser" ~/devtools/install.sh
#!usr/bin/env bash
############################
# installs homebrew packages
# installs homebrew cask packages
# adds AWS login scripts to .bash_profile
# sets terminal to launch ssh-agent on launch
############################
## Install Brew Packages
brew install asdf
brew install awscli
## Install Brew Cask Packages
brew install --cask iterm2
brew install --cask docker
Any advice would be gratefully received!
Mac OS 11.5.2 M1