소스 검색

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