From 476a613746adef8c957019d1d84dbddf81186525 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 6 Jun 2014 00:16:57 +0900 Subject: [PATCH] Fix #19: install error --- plug.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plug.vim b/plug.vim index 6999cc3..fe9314c 100644 --- a/plug.vim +++ b/plug.vim @@ -410,10 +410,11 @@ function! s:update_serial(pull) endif execute 'cd '.base let result = s:system( - \ printf('git clone --recursive %s -b %s %s 2>&1 && git submodule update --init --recursive 2>&1', + \ printf('git clone --recursive %s -b %s %s 2>&1 && cd %s && git submodule update --init --recursive 2>&1', \ s:shellesc(spec.uri), \ s:shellesc(spec.branch), - \ s:shellesc(substitute(spec.dir, '[\/]\+$', '', '')))) + \ s:shellesc(substitute(spec.dir, '[\/]\+$', '', '')), + \ s:shellesc(spec.dir))) let error = v:shell_error != 0 endif cd - @@ -566,7 +567,7 @@ function! s:update_parallel(pull, threads) else FileUtils.mkdir_p(base) d = esc dir.sub(%r{[\\/]+$}, '') - bt.call "#{cd} #{base} && git clone --recursive #{uri} -b #{branch} #{d} 2>&1 && git submodule update --init --recursive 2>&1" + bt.call "#{cd} #{base} && git clone --recursive #{uri} -b #{branch} #{d} 2>&1 && cd #{esc dir} && git submodule update --init --recursive 2>&1" end log.call name, result, ok end