diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2015-12-06 13:47:22 +0100 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2015-12-06 13:47:22 +0100 |
commit | 88d194eac9573251cb83a92ebaf88dff4fa54ad3 (patch) | |
tree | 735df5c97c90398b10ecbc3f0532fb2e9465dcc6 /railties | |
parent | f8d2a14e251b9985db11475a0cf8b1350efbf8f1 (diff) | |
download | rails-88d194eac9573251cb83a92ebaf88dff4fa54ad3.tar.gz rails-88d194eac9573251cb83a92ebaf88dff4fa54ad3.tar.bz2 rails-88d194eac9573251cb83a92ebaf88dff4fa54ad3.zip |
Remove "run with rake" suggestion.
When attempting to run a `rake` task with `bin/rails`, Rails would see
check that a Rake task existed and ask users if they meant to run it with
rake.
We don't need that anymore, as the goal is to have `rails` be a valid way
to run rake tasks.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/commands/commands_tasks.rb | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/railties/lib/rails/commands/commands_tasks.rb b/railties/lib/rails/commands/commands_tasks.rb index 6f3f4f7042..c70a2af577 100644 --- a/railties/lib/rails/commands/commands_tasks.rb +++ b/railties/lib/rails/commands/commands_tasks.rb @@ -41,8 +41,6 @@ EOT if !run_with_command && COMMAND_WHITELIST.include?(command) send(command) - else - write_error_message(command) end end @@ -154,26 +152,6 @@ EOT puts HELP_MESSAGE end - # Output an error message stating that the attempted command is not a valid rails command. - # Run the attempted command as a rake command with the --dry-run flag. If successful, suggest - # to the user that they possibly meant to run the given rails command as a rake command. - # Append the help message. - # - # Example: - # $ rails db:migrate - # Error: Command 'db:migrate' not recognized - # Did you mean: `$ rake db:migrate` ? - # (Help message output) - # - def write_error_message(command) - puts "Error: Command '#{command}' not recognized" - if %x{rake #{command} --dry-run 2>&1 } && $?.success? - puts "Did you mean: `$ rake #{command}` ?\n\n" - end - write_help_message - exit(1) - end - def parse_command(command) case command when '--version', '-v' |