mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
rails runner loads environment after parsing command-line options
This commit is contained in:
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user