Parcourir la source

Do not proceed if getcwd() returns an empty string

Close #439
Junegunn Choi il y a 10 ans
Parent
commit
7218143147
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  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