aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkennyj <kennyj@gmail.com>2012-01-06 00:32:33 +0900
committerkennyj <kennyj@gmail.com>2012-01-06 23:53:57 +0900
commita342df4917221d15b04ebbe2186fd6f2ef0225b0 (patch)
treeed81b54da73b67317503aab2d076324ccd53d332
parent5b9c8a51a5d1343a8f71008b130ee580a3417adc (diff)
downloadrails-a342df4917221d15b04ebbe2186fd6f2ef0225b0.tar.gz
rails-a342df4917221d15b04ebbe2186fd6f2ef0225b0.tar.bz2
rails-a342df4917221d15b04ebbe2186fd6f2ef0225b0.zip
Don't fork a process when assets:precompile:nondigest is invoked in assets:precompile:all. Improve GH #3694.
-rw-r--r--actionpack/lib/sprockets/assets.rake6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/sprockets/assets.rake b/actionpack/lib/sprockets/assets.rake
index a61a121d55..43405f3db9 100644
--- a/actionpack/lib/sprockets/assets.rake
+++ b/actionpack/lib/sprockets/assets.rake
@@ -1,12 +1,12 @@
require "fileutils"
namespace :assets do
- def ruby_rake_task(task)
+ def ruby_rake_task(task, fork = true)
env = ENV['RAILS_ENV'] || 'production'
groups = ENV['RAILS_GROUPS'] || 'assets'
args = [$0, task,"RAILS_ENV=#{env}","RAILS_GROUPS=#{groups}"]
args << "--trace" if Rake.application.options.trace
- ruby(*args)
+ fork ? ruby(*args) : Kernel.exec(FileUtils::RUBY, *args)
end
# We are currently running with no explicit bundler group
@@ -59,7 +59,7 @@ namespace :assets do
# required in order to compile digestless assets as the
# environment has already cached the assets on the primary
# run.
- ruby_rake_task "assets:precompile:nondigest" if Rails.application.config.assets.digest
+ ruby_rake_task("assets:precompile:nondigest", false) if Rails.application.config.assets.digest
end
task :primary => ["assets:environment", "tmp:cache:clear"] do