method
repair_command
v1_9_3_392 -
Show latest stable
- Class:
Rake::AltSystem
repair_command(cmd)public
No documentation available.
# File lib/rake/alt_system.rb, line 51
def repair_command(cmd)
"call " + (
if cmd =~ %\A\s*\".*?\"!
# already quoted
cmd
elsif match = cmd.match(%\A\s*(\S+)!)
if match[1] =~ %/!
# avoid x/y.bat interpretation as x with option /y
%"#{match[1]}"! + match.post_match
else
# a shell command will fail if quoted
cmd
end
else
# empty or whitespace
cmd
end
)
end