Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework the error message that tells users to list the tasks with rake --tasks #287

Merged
merged 1 commit into from
Nov 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/rake/task_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def [](task_name, scopes=nil)
end

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

Expand Down
2 changes: 1 addition & 1 deletion test/test_rake_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def test_find
task :tfind
assert_equal "tfind", Task[:tfind].name
ex = assert_raises(RuntimeError) { Task[:leaves] }
assert_equal "Don't know how to build task 'leaves' (see --tasks)", ex.message
assert_equal "Don't know how to build task 'leaves' (See the list of available tasks with `rake --tasks`)", ex.message
end

def test_defined
Expand Down
2 changes: 1 addition & 1 deletion test/test_rake_task_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_index
@tm["bad"]
end

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

def test_name_lookup
Expand Down