Merge branch 'winfix'
This commit is contained in:
commit
639ef572cf
@ -77,9 +77,9 @@ endf
|
|||||||
let s:bundle = {}
|
let s:bundle = {}
|
||||||
|
|
||||||
func! s:bundle.path()
|
func! s:bundle.path()
|
||||||
return join([g:bundle_dir, self.name], '/')
|
return expand(g:bundle_dir.'/'.self.name)
|
||||||
endf
|
endf
|
||||||
|
|
||||||
func! s:bundle.rtpath()
|
func! s:bundle.rtpath()
|
||||||
return has_key(self, 'rtp') ? join([self.path(), self.rtp], '/') : self.path()
|
return has_key(self, 'rtp') ? expand(self.path().'/'.self.rtp) : self.path()
|
||||||
endf
|
endf
|
||||||
|
@ -70,6 +70,11 @@ func! s:sync(bang, bundle) abort
|
|||||||
if isdirectory(git_dir)
|
if isdirectory(git_dir)
|
||||||
if !(a:bang) | return 0 | endif
|
if !(a:bang) | return 0 | endif
|
||||||
let cmd = 'cd '.shellescape(a:bundle.path()).' && git pull'
|
let cmd = 'cd '.shellescape(a:bundle.path()).' && git pull'
|
||||||
|
|
||||||
|
if (has('win32') || has('win64'))
|
||||||
|
let cmd = substitute(cmd, '^cd ','cd /d ','') " add /d switch to change drives
|
||||||
|
let cmd = '"'.cmd.'"' " enclose in quotes
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
let cmd = 'git clone '.a:bundle.uri.' '.shellescape(a:bundle.path())
|
let cmd = 'git clone '.a:bundle.uri.' '.shellescape(a:bundle.path())
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user