[英]fastlane: command not found when running from launchtl job
Hi I made an integration to create the builds of one IOS project using fastlane. 嗨我做了一个集成,使用fastlane创建一个IOS项目的构建。 Everything works as expected except the moment I try to launch a script to run the fastlane command on my Mac Computer using launchctl.
除了我尝试启动脚本以使用launchctl在我的Mac计算机上运行fastlane命令时,一切都按预期工作。 When I run the job I get the following error:
当我运行该作业时,我收到以下错误:
/Users/hugoaguero/Documents/acct/branding/usfed/ios/scripts/test.sh: line 2: fastlane: command not found
This happens with the following two lines on my test script (deploy is a lane I created on the fastfile file): 在我的测试脚本上发生以下两行(部署是我在fastfile文件上创建的一个通道):
cd ~/Documents/acct/branding/usfed/ios/
fastlane deploy
My pList file resides on the LaunchAgent folder. 我的pList文件驻留在LaunchAgent文件夹中。 This is the content of the pList file:
这是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>
If I run the command normally from terminal it executes with no issues. 如果我从终端正常运行命令,它执行没有问题。 The only problem is when it runs from the job.
唯一的问题是它从作业运行时。
I'm very new to terminal/Unix, I think that it should be an easy fix but need to solve this as soon as possible. 我对终端/ Unix很新,我认为它应该是一个简单的解决方案,但需要尽快解决这个问题。 Please help.
请帮忙。
Get the full path of the fastlane executable from the command line: 从命令行获取fastlane可执行文件的完整路径:
which fastlane
And replace fastlane
in your script with the full (absolute) path shown by the command here above. 并使用上面命令显示的完整(绝对)路径替换脚本中的
fastlane
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.