Skip to content

Commit

Permalink
Fix to accmmodate bash's backwards notion of truth
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrudel committed Dec 15, 2010
1 parent f83bf6c commit e146b76
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/doo/stock/prereqs.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Doo::Base.class_eval do
def if_passes(test, &block)
yield if run "#{test}"
yield unless run "#{test}", :just_return_failure => true
end

def if_fails(test, &block)
yield unless run "#{test}"
end
yield if run "#{test}", :just_return_failure => true
end
end

0 comments on commit e146b76

Please sign in to comment.