title: Gradle Exec Task not starting with psql on remote host
body: <p>I need to execute an SQL script on a remote database in Gradle (Version 4.2.1). So I tried it with the Exec task. The task works, when the database is on my local machine. With a remote host the task is not starting.</p>
  
  <p>These are the tasks (the first one works perfectly).</p>
  
  <pre class="lang-java prettyprint-override"><code>task psqlLocalExec(type: Exec) {
    commandLine 'cmd', '/c', 'psql -f myscript.sql'
  }
  
  task psqlRemoteExec(type: Exec) {
    commandLine 'cmd', '/c', 'psql -h my.remote.host -f myscript.sql' // not working
  }
  </code></pre>
  
  <p>The command line output (I cancelled it after some minutes):</p>
  
  <pre><code>C:\myproject&gt;gradlew :proj:psqlRemoteExec --stacktrace
  &lt;-------------&gt; 0% EXECUTING [3m 43s]
  &gt; :proj:psqlRemoteExec
  </code></pre>
  
  <p>On cmd (without Gradle) the command works.</p>