# File lib/rake/alt_system.rb, line 51
51:     def repair_command(cmd)
52:       "call " + (
53:         if cmd =~ %r!\A\s*\".*?\"!
54:           # already quoted
55:           cmd
56:         elsif match = cmd.match(%r!\A\s*(\S+)!)
57:           if match[1] =~ %r!/!
58:             # avoid x/y.bat interpretation as x with option /y
59:             %Q!"#{match[1]}"! + match.post_match
60:           else
61:             # a shell command will fail if quoted
62:             cmd
63:           end
64:         else
65:           # empty or whitespace
66:           cmd
67:         end
68:       )
69:     end