mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Showing task list on error
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user