Skip to content

Commit d0cd74c

Browse files
committed
Merge pull request rails#4350 from kennyj/improve_3694
Don't fork a process when assets:precompile:nondigest is invoked in assets:precompile:all.
2 parents 5b9c8a5 + a342df4 commit d0cd74c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

actionpack/lib/sprockets/assets.rake

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
require "fileutils"
22

33
namespace :assets do
4-
def ruby_rake_task(task)
4+
def ruby_rake_task(task, fork = true)
55
env = ENV['RAILS_ENV'] || 'production'
66
groups = ENV['RAILS_GROUPS'] || 'assets'
77
args = [$0, task,"RAILS_ENV=#{env}","RAILS_GROUPS=#{groups}"]
88
args << "--trace" if Rake.application.options.trace
9-
ruby(*args)
9+
fork ? ruby(*args) : Kernel.exec(FileUtils::RUBY, *args)
1010
end
1111

1212
# We are currently running with no explicit bundler group
@@ -59,7 +59,7 @@ namespace :assets do
5959
# required in order to compile digestless assets as the
6060
# environment has already cached the assets on the primary
6161
# run.
62-
ruby_rake_task "assets:precompile:nondigest" if Rails.application.config.assets.digest
62+
ruby_rake_task("assets:precompile:nondigest", false) if Rails.application.config.assets.digest
6363
end
6464

6565
task :primary => ["assets:environment", "tmp:cache:clear"] do

0 commit comments

Comments
 (0)