Skip to content

Commit

Permalink
Attempting to fix the issue where grunt sometimes hangs when done.
Browse files Browse the repository at this point in the history
  • Loading branch information
cowboy committed Feb 3, 2012
1 parent 137f758 commit 3eba018
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/grunt.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,14 @@ exports.tasks = function(tasks, options, done) {
done: function() {
// Output a final fail / success report.
fail.report();
// Execute "done" function when done (only if passed, of course).
if (done) { done(); }

if (done) {
// Execute "done" function when done (only if passed, of course).
done();
} else {
// Otherwise, explicitly exit.
process.exit(0);
}
}
});

Expand Down

0 comments on commit 3eba018

Please sign in to comment.