[Rake-devel] Rake::Win32.rake_system
Turpin, Jay
jay.turpin at intel.com
Fri Sep 26 12:18:02 EDT 2008
OK - now I understand why this was done. However, the CALL command is choking on any commands sent to sh that contains a newline character. It's not pretty, but this fix appears to resolve the problem (at least all of the tests pass):
# Run a command line on windows.
def rake_system(*cmd)
perform_variable_expansion cmd[0]
system(*cmd)
end
def perform_variable_expansion(cmd)
ENV.each do |k, v|
cmd.sub!(/\%#{k}\%/i, v)
end
end
Regards,
Jay Turpin
"There are four things that hold back human progress. Ignorance, stupidity, committees and accountants." - Charles J.C. Lyall
More information about the Rake-devel
mailing list