From b5c501f81806c55d51857960902940cfe8d96141 Mon Sep 17 00:00:00 2001 From: Basarat Ali Syed Date: Fri, 1 Aug 2014 17:29:51 +1000 Subject: [PATCH] Set the done flag on the context so it can be determined if complete was called This is needed because `grunt-contrib-watch` calls `complete` on our behalf. We should not call `done` ourself in this case. This change will allow us to check for external completion inside our task. --- lib/util/task.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/util/task.js b/lib/util/task.js index 61a004d7a..377ee36bf 100644 --- a/lib/util/task.js +++ b/lib/util/task.js @@ -211,6 +211,8 @@ // The task succeeded. success = true; } + // Set the done flag on the context so it can be determined if complete was called + context.done = true; // The task has ended, reset the current task object. this.current = {}; // A task has "failed" only if it returns false (async) or if the