diff --git a/plug.vim b/plug.vim index 866db9c..ff1827b 100644 --- a/plug.vim +++ b/plug.vim @@ -705,6 +705,12 @@ function! s:prepare(...) throw 'Invalid current working directory. Cannot proceed.' endif + for evar in ['$GIT_DIR', '$GIT_WORK_TREE'] + if exists(evar) + throw evar.' detected. Cannot proceed.' + endif + endfor + call s:job_abort() if s:switch_in() normal q