title: How to explicitly fail a task in ruby rake?
body: <p>Let's say I have a rakefile like this:</p>
  
  <pre><code>file 'file1' =&gt; some_dependencies do
    sh 'external tool I do not have control over, which sometimes fail to create the file'
    ???
  end
  
  task :default =&gt; 'file1' do
    puts "everything's OK"
  end
  </code></pre>
  
  <p>Now if I put nothing in place of ???, I get the OK message, even if the external tool fails to generate file. What is the proper way to informing rake, that 'file1' task has failed and it should abort (hopefully presenting a meaningful message - like which task did fail) - the only think I can think of now is raising an exception there, but that just doesn't seem right.</p>
  
  <p>P.S The tool always returns 0 as exit code.</p>