From 001b14c252c9174431b992514ee7ec7efa803386 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Sun, 7 Aug 2011 13:17:05 -0400 Subject: [PATCH] only run all if run once failed and then succeeded. i'll need to actually write tests soon... --- lib/guard/hydra.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/guard/hydra.rb b/lib/guard/hydra.rb index 9f0b00f..5213cea 100644 --- a/lib/guard/hydra.rb +++ b/lib/guard/hydra.rb @@ -33,13 +33,20 @@ class Guard::Hydra < Guard::Guard Guard::UI.info "Not a Rails app, using default environment settings" end + @did_fail = false + run_all if @options[:all_on_start] end def run_on_change(files = []) if !(files = ensure_files(files)).empty? Guard::UI.info "Running Hydra on #{files.join(', ')}" - run_all if run_hydra(files) + if run_hydra(files) + run_all if @did_fail + @did_fail = false + else + @did_fail = true + end end end