fastlane: command not found when running from launchtl job
<p>Hi I made an integration to create the builds of one IOS project using fastlane.  Everything works as expected except the moment I try to launch a script to run the fastlane command on my Mac Computer using launchctl. When I run the job I get the following error:</p>

<pre><code>/Users/hugoaguero/Documents/acct/branding/usfed/ios/scripts/test.sh: line 2: fastlane: command not found
</code></pre>

<p>This happens with the following two lines on my test script (deploy is a lane I created on the fastfile file):</p>

<pre><code>cd ~/Documents/acct/branding/usfed/ios/
fastlane deploy
</code></pre>

<p>My pList file resides on the LaunchAgent folder.  This is the content of the pList file:</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
    &lt;key&gt;Label&lt;/key&gt;
    &lt;string&gt;com.zerowidth.launched.grobankingbuild&lt;/string&gt;
    &lt;key&gt;ProgramArguments&lt;/key&gt;
    &lt;array&gt;
        &lt;string&gt;sh&lt;/string&gt;
        &lt;string&gt;-c&lt;/string&gt;
        &lt;string&gt;/Users/hugoaguero/Documents/acct/branding/usfed/ios/scripts/test.sh&lt;/string&gt;
    &lt;/array&gt;
    &lt;key&gt;StandardErrorPath&lt;/key&gt;
    &lt;string&gt;/tmp/com.zerowidth.launched.grobankingbuild.err&lt;/string&gt;
    &lt;key&gt;StandardOutPath&lt;/key&gt;
    &lt;string&gt;/tmp/com.zerowidth.launched.grobankingbuild.out&lt;/string&gt;
    &lt;key&gt;StartInterval&lt;/key&gt;
    &lt;integer&gt;300&lt;/integer&gt;
&lt;/dict&gt;
&lt;/plist&gt;
</code></pre>

<p>If I run the command normally from terminal it executes with no issues.  The only problem is when it runs from the job. </p>

<p>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. Please help.</p>