diff options
author | Dmitriy Kiriyenko <dmitriy.kiriyenko@anahoret.com> | 2011-09-29 15:35:25 +0300 |
---|---|---|
committer | Dmitriy Kiriyenko <dmitriy.kiriyenko@anahoret.com> | 2011-09-29 15:35:25 +0300 |
commit | 148e4a541361f140f13aa35bb43b3d57c95831d6 (patch) | |
tree | 77a9670f6fa552e0eeea1a9c783c6e992bc8c1ae /railties/lib/rails/generators/actions.rb | |
parent | 64b0c8888b908ede5372e0a70cb4cb8731d372ba (diff) | |
download | rails-148e4a541361f140f13aa35bb43b3d57c95831d6.tar.gz rails-148e4a541361f140f13aa35bb43b3d57c95831d6.tar.bz2 rails-148e4a541361f140f13aa35bb43b3d57c95831d6.zip |
Honour RAILS_ENV environment variable when running rake.
Diffstat (limited to 'railties/lib/rails/generators/actions.rb')
-rw-r--r-- | railties/lib/rails/generators/actions.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb index 575f4bb106..5af5d3b856 100644 --- a/railties/lib/rails/generators/actions.rb +++ b/railties/lib/rails/generators/actions.rb @@ -252,7 +252,7 @@ module Rails # def rake(command, options={}) log :rake, command - env = options[:env] || 'development' + env = options[:env] || ENV["RAILS_ENV"] || 'development' sudo = options[:sudo] && RbConfig::CONFIG['host_os'] !~ /mswin|mingw/ ? 'sudo ' : '' in_root { run("#{sudo}#{extify(:rake)} #{command} RAILS_ENV=#{env}", :verbose => false) } end |