From 7218143147280ea1a08869697b924c64008a9615 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 6 Mar 2016 11:03:33 +0900 Subject: [PATCH] Do not proceed if getcwd() returns an empty string Close #439 --- plug.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plug.vim b/plug.vim index 25b26e2..4a606f0 100644 --- a/plug.vim +++ b/plug.vim @@ -665,6 +665,10 @@ function! s:finish_bindings() endfunction function! s:prepare(...) + if empty(getcwd()) + throw 'Invalid current working directory. Cannot proceed.' + endif + call s:job_abort() if s:switch_in() normal q