mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
rails runner loads environment after parsing command-line options
This commit is contained in:
parent
6f247347a1
commit
39ebd6eb2b
2 changed files with 2 additions and 2 deletions
|
@ -58,8 +58,6 @@ when 'plugin'
|
|||
require 'rails/commands/plugin'
|
||||
when 'runner'
|
||||
require 'rails/commands/runner'
|
||||
require ENV_PATH
|
||||
|
||||
|
||||
when '--help', '-h'
|
||||
puts HELP_TEXT
|
||||
|
|
|
@ -35,6 +35,8 @@ ARGV.delete(code_or_file)
|
|||
|
||||
ENV["RAILS_ENV"] = options[:environment]
|
||||
|
||||
require ENV_PATH
|
||||
|
||||
begin
|
||||
if code_or_file.nil?
|
||||
$stderr.puts "Run '#{$0} -h' for help."
|
||||
|
|
Loading…
Reference in a new issue