From ff4cbe23c0ff7bebeed2aba4962e2a027fc6ed9a Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 10 Sep 2014 00:21:39 +0900 Subject: [PATCH] Throw v:shell_error when system() output is empty --- plug.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plug.vim b/plug.vim index 2c946d9..8640180 100644 --- a/plug.vim +++ b/plug.vim @@ -1044,7 +1044,7 @@ function! s:upgrade() if executable('curl') let output = system(printf('curl -fLo %s %s', s:shellesc(new), s:plug_source)) if v:shell_error - throw get(split(output, '\n'), -1, '') + throw get(split(output, '\n'), -1, v:shell_error) endif elseif has('ruby') ruby << EOF