Permalink
Browse files

Make sure ENV['RAILS_ENV'] and RAILS_ENV are kept in sync

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2539 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 42bcbcb commit de42f26df787af135baef65f59aa145873714aa5 @jamis jamis committed Oct 12, 2005
Showing with 2 additions and 5 deletions.
  1. +2 −5 railties/lib/commands/runner.rb
@@ -20,11 +20,8 @@
opts.parse!
end
-if defined?(RAILS_ENV)
- RAILS_ENV.replace(options[:environment])
-else
- ENV["RAILS_ENV"] = options[:environment]
-end
+ENV["RAILS_ENV"] = options[:environment]
+RAILS_ENV.replace(options[:environment]) if defined?(RAILS_ENV)
require RAILS_ROOT + '/config/environment'
eval(ARGV.first)

0 comments on commit de42f26

Please sign in to comment.