瀏覽代碼

Do not proceed if getcwd() returns an empty string

Close #439
Junegunn Choi 9 年之前
父節點
當前提交
7218143147
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      plug.vim

+ 4 - 0
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