[英]fastlane: command not found when running from launchtl job
嗨我做了一个集成,使用fastlane创建一个IOS项目的构建。 除了我尝试启动脚本以使用launchctl在我的Mac计算机上运行fastlane命令时,一切都按预期工作。 当我运行该作业时,我收到以下错误:
/Users/hugoaguero/Documents/acct/branding/usfed/ios/scripts/test.sh: line 2: fastlane: command not found
在我的测试脚本上发生以下两行(部署是我在fastfile文件上创建的一个通道):
cd ~/Documents/acct/branding/usfed/ios/
fastlane deploy
我的pList文件驻留在LaunchAgent文件夹中。 这是pList文件的内容:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.zerowidth.launched.grobankingbuild</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
<string>/Users/hugoaguero/Documents/acct/branding/usfed/ios/scripts/test.sh</string>
</array>
<key>StandardErrorPath</key>
<string>/tmp/com.zerowidth.launched.grobankingbuild.err</string>
<key>StandardOutPath</key>
<string>/tmp/com.zerowidth.launched.grobankingbuild.out</string>
<key>StartInterval</key>
<integer>300</integer>
</dict>
</plist>
如果我从终端正常运行命令,它执行没有问题。 唯一的问题是它从作业运行时。
我对终端/ Unix很新,我认为它应该是一个简单的解决方案,但需要尽快解决这个问题。 请帮忙。
从命令行获取fastlane可执行文件的完整路径:
which fastlane
并使用上面命令显示的完整(绝对)路径替换脚本中的fastlane
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.