support spaces in Windows cmd.exe arguments

This commit is contained in:
Alan Hamlett 2018-04-05 00:19:33 -07:00
parent ab2a52a69b
commit c02c9f2812

View file

@ -348,7 +348,12 @@ let s:VERSION = '7.1.1'
endif
if s:has_async
let job = job_start([&shell, &shellcmdflag, s:JoinArgs(cmd)], {
if s:IsWindows()
let job_cmd = [&shell, &shellcmdflag] + cmd
else
let job_cmd = [&shell, &shellcmdflag, s:JoinArgs(cmd)]
endif
let job = job_start(job_cmd, {
\ 'stoponexit': '',
\ 'callback': {channel, output -> s:AsyncHandler(output, cmd)}})
if extra_heartbeats != ''