Skip to content

Commit

Permalink
Simplify auxiliary command files directory finding.
Browse files Browse the repository at this point in the history
Still vulnerable to different file structures. We likely want something
more robust when we tackle in app commands.
  • Loading branch information
kaspth committed Sep 25, 2016
1 parent d5bd4b2 commit 993c069
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion railties/lib/rails/command/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def usage_path
# For a `Rails::Command::TestCommand` placed in `rails/command/test_command.rb`
# would return `rails/test`.
def default_command_root
path = File.expand_path(File.join(base_name, command_name), __dir__)
path = File.expand_path(File.join("../commands", command_name), __dir__)
path if File.exist?(path)
end

Expand Down

0 comments on commit 993c069

Please sign in to comment.