xcodetriggerscontinuous-integrationxcode-botsfastlane

Fastlane command not found in XCode bots post build trigger


Here's my script

echo "===================="
echo "MAKE ENTERPRISE IPA"
echo "===================="

pwd
cd "${XCS_PRIMARY_REPO_DIR}/"
pwd
fastlane enterprise

This is what's in the logs

====================
MAKE ENTERPRISE IPA
====================
/Users/XcodeServer/Library/Caches/XCSBuilder/Bots/1fc5d5c4b44f01807859f14cc303b56c/Source
/Users/XcodeServer/Library/Caches/XCSBuilder/Bots/1fc5d5c4b44f01807859f14cc303b56c/Source/ProjectName
/var/folders/rc/28t61gwn3c1bcsn1b360d0h40000gp/T/F389538F-77F0-481A-A413-456C809755D1-22343-000364DDDB596983: line 10: fastlane: command not found

If I march directly to the directory on the build server and go to XCS_PRIMARY_REPO_DIR and type in fastlane enterprise everything works fine. I don't know why it's looking in var/folders for fastlane.

Any help would be greatly appreciated thank you.


Solution

  • I added usr/local/bin to the path. I added the following line before I call fastlane. If anyone knows of a better place to put it. I'm all ears.

    export PATH=/usr/local/bin:$PATH