title: Jenkins No such file or directory error. But the file exists
body: <p>I have a problem with running bash script as a job in Jenkins (Execute shell step). Basically I narrowed my script to be one line now to test why Jenkins fails to run it. Here it is:</p>
  
  <pre><code>waxsim
  </code></pre>
  
  <p>So it is just one line. That should give me this output when ran without parameters:</p>
  
  <pre><code>No app-path was specified!
  usage: waxsim [options] app-path
  example: waxsim -s 2.2 /path/to/app.app
  Available options are:
      -s sdk  Version number of sdk to use (-s 3.1)
      -f family   Device to use (-f ipad)
      -e VAR=value    Environment variable to set (-e CFFIXED_HOME=/tmp/iphonehome)
      -a  Available SDKs
      -v path Output video recording at path
      -h  Prints out this wonderful documentation!
  </code></pre>
  
  <p>Jenkins runs as a jenkins user. When the job is ran it fails with:</p>
  
  <pre><code>+ waxsim
  /var/folders/gx/t63prwt53w7gr2jjt9k66q9800009c/T/hudson4478539334800834890.sh: 
  line 3: waxsim: No such file or directory
  Build step 'Execute shell' marked build as failure
  </code></pre>
  
  <p>When I execute <code>waxsim</code> manually, logged in as a jenkins user, everything works fine. It works for every user on the machine. It does not work only when executed in Jenkins job. Anyone knows what may be the issue?</p>
  
  <p>I tried specifying the full path to <code>waxsim</code>, which is: <code>/usr/bin/waxsim</code> but it makes no difference.</p>
  
  <p>Thanks!</p>