From ac26a33542925fe5fa458572e2a0161f3d9c5beb Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 16 May 2020 01:25:11 +1200 Subject: Bail from Vim if &runtimepath is empty Really shouldn't happen, but probably worth catching. --- vim/vimrc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'vim') diff --git a/vim/vimrc b/vim/vimrc index dc1183f6..0d9c7b39 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -113,9 +113,10 @@ endif " first value from the 'runtimepath'. We'll use this later on in the file to " comprehensively match expected paths for vimrc files. " -if &runtimepath !=# '' - let $MYVIM = option#Split(&runtimepath)[0] +if &runtimepath ==# '' + throw 'Empty ''runtimepath''' endif +let $MYVIM = option#Split(&runtimepath)[0] " The next components of the runtime directory that we'll set up here will " make use of the user’s configured XDG base directories: -- cgit v1.2.3