Skip to content

Commit 1d09209

Browse files
authored
Merge pull request #287 from colby-swandale/rework-invalid-task-error-message
Rework the error message that tells users to list the tasks with `rake --tasks`
2 parents 643a9e8 + b6521cf commit 1d09209

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/rake/task_manager.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def [](task_name, scopes=nil)
6060
end
6161

6262
def generate_message_for_undefined_task(task_name)
63-
message = "Don't know how to build task '#{task_name}' (see --tasks)"
63+
message = "Don't know how to build task '#{task_name}' (See the list of available tasks with `rake --tasks`)"
6464
message + generate_did_you_mean_suggestions(task_name)
6565
end
6666

test/test_rake_task.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def test_find
172172
task :tfind
173173
assert_equal "tfind", Task[:tfind].name
174174
ex = assert_raises(RuntimeError) { Task[:leaves] }
175-
assert_equal "Don't know how to build task 'leaves' (see --tasks)", ex.message
175+
assert_equal "Don't know how to build task 'leaves' (See the list of available tasks with `rake --tasks`)", ex.message
176176
end
177177

178178
def test_defined

test/test_rake_task_manager.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def test_index
2525
@tm["bad"]
2626
end
2727

28-
assert_equal "Don't know how to build task 'bad' (see --tasks)", e.message
28+
assert_equal "Don't know how to build task 'bad' (See the list of available tasks with `rake --tasks`)", e.message
2929
end
3030

3131
def test_name_lookup

0 commit comments

Comments
 (0)