From eb7a43b1e6d61e3ad704e965be72a00d5cf29cc5 Mon Sep 17 00:00:00 2001 From: forethinker Date: Sun, 27 Oct 2013 23:05:48 -0700 Subject: [PATCH] Added a condition to check for when assigning cmd to execute. --- autoload/vundle/installer.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index 8386aae..4780cf8 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -169,7 +169,7 @@ endf func! vundle#installer#delete(bang, dir_name) abort - let cmd = (has('win32') || has('win64')) ? + let cmd = ((has('win32') || has('win64')) && empty(matchstr(&shell, 'sh'))) ? \ 'rmdir /S /Q' : \ 'rm -rf' @@ -251,7 +251,7 @@ func! s:sync(bang, bundle) abort endf func! g:shellesc(cmd) abort - if (has('win32') || has('win64')) + if ((has('win32') || has('win64')) && empty(matchstr(&shell, 'sh'))) if &shellxquote != '(' " workaround for patch #445 return '"'.a:cmd.'"' " enclose in quotes so && joined cmds work endif @@ -260,7 +260,7 @@ func! g:shellesc(cmd) abort endf func! g:shellesc_cd(cmd) abort - if (has('win32') || has('win64')) + if ((has('win32') || has('win64')) && empty(matchstr(&shell, 'sh'))) let cmd = substitute(a:cmd, '^cd ','cd /d ','') " add /d switch to change drives let cmd = g:shellesc(cmd) return cmd