I'm executing the following shell script on a MAC slave within the Azure DevOps pipeline:
#!/bin/bash
curl -O https://github.com/MonoGame/MonoGame/releases/download/v3.7.1/MonoGame.pkg
ls -l
sudo installer -pkg MonoGame.pkg -target /
This script provides the following output:
[command]/bin/bash /Users/vsts/agent/2.149.2/work/1/s/azure/install.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 601 0 601 0 0 1090 0 --:--:-- --:--:-- --:--:-- 1096
total 16
-rw-r--r-- 1 vsts staff 601 Apr 6 10:17 MonoGame.pkg
-rw-r--r-- 1 vsts staff 143 Apr 6 10:17 install.sh
installer: Error the package path specified was invalid: 'MonoGame.pkg'.
##[error]/bin/bash failed with return code: 1
##[error]Bash failed with error: /bin/bash failed with return code: 1
I've tried the following variations without success:
sudo installer -pkg MonoGame.pkg -target /
sudo installer -pkg "MonoGame.pkg" -target /
sudo installer -pkg "./MonoGame.pkg" -target /
sudo installer -pkg "$(pwd)/MonoGame.pkg" -target /
Doing a chmod 777 MonoGame.pkg
or executing everything with sudo doesn't change anything either.
Any idea why the package is not found? (I don't know a lot about MAC, I just plan on using it for CI)
Is the message maybe misleading and the package itself is invalid (rather than the path to it?)