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...
1 parent 60cb7d6 commit 81f14a5433cbba3e7a6088156d9c548bc5c252ea @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 81f14a5

Please sign in to comment.