Skip to content

Commit

Permalink
Merge remote-tracking branch 'scottpayne/patch-1'
Browse files Browse the repository at this point in the history
  • Loading branch information
rtlong committed Dec 8, 2011
2 parents 0292c85 + e2403f3 commit c7ad9c1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/guard/rake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,17 @@ def run_on_change(paths)

def run_rake_task
UI.info "running #{@task}"
::Rake::Task[@task].execute
task = ::Rake::Task[@task]
reenable_task_and_prerequisites task
task.invoke
end

private

def reenable_task_and_prerequisites(task)
task.reenable
task.prerequisites.each { |pre| reenable_task_and_prerequisites(::Rake::Task[pre]) }
end

end
end

0 comments on commit c7ad9c1

Please sign in to comment.