title: Ruby/Thor exit status in case of an error
body: <p>I'm new to Thor (and to Ruby) and I'm considering using it within a build script, as it's said it can be a replacement to Rake (thus to Make).
  However after a short trial, I'm confused about the error status it returns. I quickly went through the wiki but haven't seen any mention about that.</p>
  
  <p>With just the first "Simple Example", <code>test.thor</code>:</p>
  
  <pre><code>class Test &lt; Thor
    desc "example", "an example task"
    def example
      puts "I'm a thor task!"
    end
  end
  </code></pre>
  
  <p>version #:</p>
  
  <pre><code>eruve&gt;thor version
  Thor 0.18.1
  </code></pre>
  
  <p>I tried the following, an erroneous command on purpose:</p>
  
  <pre><code>eruve&gt;ruby --version; thor test:example badarg; echo exit status: $?
  
  ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin10.8.0]
  ERROR: thor example was called with arguments ["badarg"]
  Usage: "thor test:example".
  exit status: 0
  </code></pre>
  
  <p>So, there was an error but it exits with status 0 nonetheless... meaning I'd rather not use it in a (non-ruby) script, or else the script would continue running even though it should terminate. Subsequent errors might be difficult to analyse.</p>
  
  <p>I must be missing something, hence my questions:</p>
  
  <ul>
  <li><p>Is there an easy way to get a non-zero status by default in case of an error (config file, etc.)?</p></li>
  <li><p>If not, what am I supposed to do to get it right?</p></li>
  </ul>
  
  <p>Thank you.</p>