Win: string passed to job_start() must contain shell

References #228.
This commit is contained in:
Marco Hinz 2017-02-19 17:10:00 +01:00
parent e1396b903c
commit 40deeb3fdf
No known key found for this signature in database
GPG Key ID: 1C980A1B657B4A4F

View File

@ -245,7 +245,15 @@ endfunction
" Function: s:initialize_job {{{1
function! s:initialize_job(vcs, do_register) abort
let vcs_cmd = s:expand_cmd(a:vcs)
let cmd = (has('win32') && &shell =~ 'cmd') ? vcs_cmd : ['sh', '-c', vcs_cmd]
if has('win32')
if has('nvim')
let cmd = &shell =~ 'cmd' ? vcs_cmd : ['sh', '-c', vcs_cmd]
else
let cmd = join([&shell, &shellcmdflag, vcs_cmd])
endif
else
let cmd = ['sh', '-c', vcs_cmd]
endif
let options = {
\ 'stdoutbuf': [],
\ 'vcs': a:vcs,