title: Why does using csh -e option succeed on the command line, but fail in a jenkins execute shell?
body: <p>I am using jenkins to build a bunch of legacy code. The legacy code comes with some complex build scripts, written in csh.</p>
  
  <p>The build scripts do not check for or exit on errors. The user is expected to scan the output for error messages. However, this does not work well with Jenkins.</p>
  
  <p>I am executing the csh build scripts in a jenkins "shell execution" build step. For example:</p>
  
  <pre>
  export PATH=`pwd`/ALL/bin:/usr/local/bin:/usr/bin:/bin:$PATH
  cd ATLb2.00/expt_02.0
  csh 020.com
  </pre>
  
  <p>When I run this from the command line, I can also use the -e option:</p>
  
  <pre>
  csh -e 020.com
  </pre>
  
  <p>In this case, as I expect, the script is run, but when the first error is encountered, the script stops and returns a non-zero code. However, when I try this in Jenkins, the build fails as soon as it gets to the csh -e command, without executing any of the script. </p>
  
  <p>The error I get in Jenkins is:</p>
  
  <pre>
  + csh -e 020.com
  Build step 'Execute shell' marked build as failure
  </pre>
  
  <p>On the command line, the script is run and I see all kinds of output, until something fails, and then the script exits. On Jenkins the script seems to fail without even running. There is no output, and even scripts with no failures will not run for me under jenkins with the -e option.</p>
  
  <p>What's up?</p>