diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-18 07:33:28 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-18 07:33:28 +0000 |
commit | 97d5f4acdfb986c5dc26f7c48518ef8a7d26f8bb (patch) | |
tree | 49f51bf1f2772b568e4e302c5d24281e4ac04c7c /railties/lib/commands | |
parent | ae76e227310389170775d0d3cef963daa793e29f (diff) | |
download | rails-97d5f4acdfb986c5dc26f7c48518ef8a7d26f8bb.tar.gz rails-97d5f4acdfb986c5dc26f7c48518ef8a7d26f8bb.tar.bz2 rails-97d5f4acdfb986c5dc26f7c48518ef8a7d26f8bb.zip |
script/console uses RAILS_ENV environment variable if present. Closes #2932.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3083 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/commands')
-rw-r--r-- | railties/lib/commands/console.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/commands/console.rb b/railties/lib/commands/console.rb index 0aed60152c..6e61acb22f 100644 --- a/railties/lib/commands/console.rb +++ b/railties/lib/commands/console.rb @@ -12,7 +12,7 @@ libs = " -r irb/completion" libs << " -r #{RAILS_ROOT}/config/environment" libs << " -r console_sandbox" if options[:sandbox] -ENV['RAILS_ENV'] = ARGV.first || 'development' +ENV['RAILS_ENV'] = ARGV.first || ENV['RAILS_ENV'] || 'development' if options[:sandbox] puts "Loading #{ENV['RAILS_ENV']} environment in sandbox." puts "Any modifications you make will be rolled back on exit." |