Skip to content

Commit

Permalink
Rework the error message that tells to list the tasks with `rake --ta…
Browse files Browse the repository at this point in the history
…sks`
  • Loading branch information
colby-swandale committed Nov 2, 2018
1 parent 3988bc5 commit b6521cf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
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

0 comments on commit b6521cf

Please sign in to comment.