title: In gradle tasks of type Exec, why do commandLine and executable behave differently?
body: <p>Does anyone know why in tasks of type <code>Exec</code> <code>commandline</code> and <code>executable</code> behave differently in terms of inheriting environment vars?</p>
  <p>For example, I cannot run this Task because Gradle fails to find ruby from my environment:</p>
  <pre class="lang-groovy prettyprint-override"><code>task checkRubyVersionCommandLine(type: Exec) {
     commandLine 'ruby -v'
  }
  </code></pre>
  <p>Yet this works fine:</p>
  <pre class="lang-groovy prettyprint-override"><code>task checkRubyVersionExecute(type: Exec) {
      executable = 'ruby' 
      args = ['-v']
  }
  </code></pre>
  <p>What is <code>commandLine</code> for, or how can I get it to pick up the variables from the shell it is executed from? Why does <code>executable</code> just work?</p>