简体   繁体   English

fastlane:从launchtl作业运行时找不到命令

[英]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.

相关问题 收到错误“找不到命令:fastlane” - Getting error “command not found: fastlane” 运行命令 fastlane init 时,Fastlane 永远卡住 - Fastlane stuck forever when run command fastlane init 运行 UI 测试时 Fastlane 扫描“无法合成事件”,适用于 Xcode - Fastlane Scan “Failed to synthesize event” when running UI Tests, works from Xcode 运行 sudo gem install fastlane -NV 会引发错误安装 fastlane ruby​​zip requires ruby​​ version &gt;= 2.4 when - running sudo gem install fastlane -NV throws the error installing fastlane rubyzip requires ruby version >= 2.4 when 在快速通道中运行健身脚本时如何获取用户选择的方案? - how to get user selected scheme when running gym script in fastlane? 从命令行调用快照(FastLane 工具 > 快照) - Calling Snapshot from the command line (FastLane Tools > Snapshot) Fastlane构建可从命令行而不是Jenkins进行 - Fastlane build works from command line, not from Jenkins 来自 CircleCI 的 Fastlane Testflight - Fastlane Testflight from CircleCI 带有fastlane的Xcode 9.1无法无头运行 - Xcode 9.1 with fastlane not running headless 在 Fastlane 上运行时,`twoFingerTap()` 和 `tap(withNumberOfTaps:1 numberOfTouches:2)` 有什么区别? - What's the difference between `twoFingerTap()` and `tap(withNumberOfTaps:1 numberOfTouches:2)` when running it on Fastlane?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM