1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

Showing task list on error

This commit is contained in:
Trevor Burnham 2011-11-13 15:12:12 -05:00
parent 79945ad473
commit 97dbb7bb49
2 changed files with 4 additions and 0 deletions

View file

@ -78,11 +78,13 @@
missingOption = function(option) {
console.error("No such option: \"" + option + "\"\n");
printTasks();
return process.exit(1);
};
missingTask = function(task) {
console.error("No such task: \"" + task + "\"\n");
printTasks();
return process.exit(1);
};

View file

@ -68,11 +68,13 @@ printTasks = ->
# Print an error and exit when attempting to use an invalid option.
missingOption = (option) ->
console.error """No such option: "#{option}"\n"""
printTasks()
process.exit 1
# Print an error and exit when attempting to call an undefined task.
missingTask = (task) ->
console.error """No such task: "#{task}"\n"""
printTasks()
process.exit 1
# When `cake` is invoked, search in the current and all parent directories