title: How to avoid log being displayed after travis_wait?
body: <p><code>travis_wait [minutes]</code> allows to increase the timeout after no output has been produced to the specified argument on Travis CI. However in combination with output that exceeds the 4MB limit which I overcome by adding <code>&amp;&gt; /tmp/somefile || tail -n 10000 /tmp/somefile</code> the complete log is displayed after a failure, e.g.</p>
  
  <pre><code>$ travis_wait 30 bash -c 'mvn install -DskipTests=true -Dmaven.javadoc.skip=true --batch-mode --show-version &amp;&gt; /tmp/tomee-build.log || tail -n 10000 /tmp/tomee-build.log'
  
  Still running (20 of 30): bash -c mvn install -DskipTests=true -Dmaven.javadoc.skip=true --batch-mode --show-version &amp;&gt; /tmp/tomee-build.log || tail -n 10000 /tmp/tomee-build.log
  
  The command bash -c mvn install -DskipTests=true -Dmaven.javadoc.skip=true --batch-mode --show-version &amp;&gt; /tmp/tomee-build.log || tail -n 10000 /tmp/tomee-build.log exited with 1.
  
  Log:
  
  Picked up _JAVA_OPTIONS: -Xmx2048m -Xms512m
  
  [INFO] Scanning for projects...
  </code></pre>
  
  <p>which is obviously the start of the build log instead of the last 10000 lines printed by <code>tail</code> (see <a href="https://travis-ci.org/krichter722/tomee/jobs/398814959" rel="nofollow noreferrer">https://travis-ci.org/krichter722/tomee/jobs/398814959</a> for details).</p>
  
  <p>This works fine with a minimal setup using <code>python script.py &amp;&gt; /tmp/build.log || (tail -n 100 /tmp/build.log &amp;&amp; exit 1)</code> (where <code>script.py</code> prints numbers from 0 to 1000000 each in a new line and exits with code 1 to simulate a build failure) (see <a href="https://travis-ci.org/krichter722/travis-log-exceeded/builds/400489069" rel="nofollow noreferrer">https://travis-ci.org/krichter722/travis-log-exceeded/builds/400489069</a> for details).</p>