title: How to execute a task or command after another task even if it failed
body: <p>I have a rather long running task in sbt and would like to be notified audibly after it finished, <strong>even it if failed</strong>. I got partially there with this crudeness:</p>
  <pre class="lang-scala prettyprint-override"><code>lazy val ding = taskKey[Unit](&quot;plays a ding sound&quot;)
  ding := {
    Seq(&quot;play&quot;, &quot;-q&quot;, &quot;/…/SmallGlockA.wav&quot;).run
  }
  </code></pre>
  <p>I invoke aforementioned task like such:</p>
  <pre><code>sbt&gt; ;test;ding
  </code></pre>
  <p>And while this works well if the task succeeded, it will of course not play the sound if the task failed, which – given that it's tests – is likely.</p>
  <p>Any ideas how I can work around this? It doesn't have to be pretty or super robust – this will not get committed, it will just be a local thing for me.</p>