How to workaround "the input device is not a TTY" when using grunt-shell to invoke a script that calls docker run? : <p>When issuing <code>grunt shell:test</code>, I'm getting warning "the input device is not a TTY" &amp; don't want to have to use <code>-f</code>:</p>

<pre><code>$ grunt shell:test
Running "shell:test" (shell) task
the input device is not a TTY
Warning: Command failed: /bin/sh -c ./run.sh npm test
the input device is not a TTY
 Use --force to continue.

Aborted due to warnings.
</code></pre>

<p>Here's the <code>Gruntfile.js</code> command:</p>

<pre><code>shell: {
  test: {
    command: './run.sh npm test'
  }
</code></pre>

<p>Here's <code>run.sh</code>:</p>

<pre><code>#!/bin/sh
# should use the latest available image to validate, but not LATEST
if [ -f .env ]; then
  RUN_ENV_FILE='--env-file .env'
fi
docker run $RUN_ENV_FILE -it --rm --user node -v "$PWD":/app -w /app yaktor/node:0.39.0 $@
</code></pre>

<p>Here's the relevant <code>package.json</code> <code>scripts</code> with command <code>test</code>:</p>

<pre><code>"scripts": {
  "test": "mocha --color=true -R spec test/*.test.js &amp;&amp; npm run lint"
}
</code></pre>

<p>How can I get <code>grunt</code> to make <code>docker</code> happy with a TTY?  Executing <code>./run.sh npm test</code> outside of grunt works fine:</p>

<pre><code>$ ./run.sh npm test

&gt; yaktor@0.59.2-pre.0 test /app
&gt; mocha --color=true -R spec test/*.test.js &amp;&amp; npm run lint


[snip]

  105 passing (3s)


&gt; yaktor@0.59.2-pre.0 lint /app
&gt; standard --verbose
</code></pre>
