From 40deeb3fdfc858e36639c6b073fed06c31c778ce Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Sun, 19 Feb 2017 17:10:00 +0100 Subject: [PATCH] Win: string passed to job_start() must contain shell References #228. --- autoload/sy/repo.vim | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/autoload/sy/repo.vim b/autoload/sy/repo.vim index 77342ea..fdb055c 100644 --- a/autoload/sy/repo.vim +++ b/autoload/sy/repo.vim @@ -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,