Permalink
Browse files

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
  • Loading branch information...
2 parents d9c4862 + c11e78c commit 77c6706dad7a53bf57d5c6e3980e94ea40b603eb @tenderlove tenderlove committed Jan 31, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 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

0 comments on commit 77c6706

Please sign in to comment.