From 81f14a5433cbba3e7a6088156d9c548bc5c252ea Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 31 Jan 2012 10:57:24 -0800 Subject: Merge pull request #4735 from arton/master Re-launch assets:precompile task using original $0 if $0 is batch file so it works on Windows --- actionpack/lib/sprockets/assets.rake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/sprockets/assets.rake') diff --git a/actionpack/lib/sprockets/assets.rake b/actionpack/lib/sprockets/assets.rake index 43405f3db9..3bf8571d11 100644 --- a/actionpack/lib/sprockets/assets.rake +++ b/actionpack/lib/sprockets/assets.rake @@ -6,7 +6,11 @@ namespace :assets do groups = ENV['RAILS_GROUPS'] || 'assets' args = [$0, task,"RAILS_ENV=#{env}","RAILS_GROUPS=#{groups}"] args << "--trace" if Rake.application.options.trace - fork ? ruby(*args) : Kernel.exec(FileUtils::RUBY, *args) + if $0 =~ /rake\.bat\Z/i + Kernel.exec $0, *args + else + fork ? ruby(*args) : Kernel.exec(FileUtils::RUBY, *args) + end end # We are currently running with no explicit bundler group -- cgit v1.2.3