Fix packer and nvim already installed check (#382)

It was not possible to install LunarVim if these programs were already
installed. The check is syntactically incorrect and will always return
non-0 status, and the installer always continued with installing packer
and nvim. This failed with an error: "fatal: destination path
'REDACTED/packer.nvim' already exists and is not an empty directory."

Correct the syntax error by checking if the file exists.
This commit is contained in:
Simon Fontana Oscarsson 2021-05-09 17:22:46 +02:00 committed by GitHub
parent 123dfca594
commit cce4f50e76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -157,13 +157,13 @@ which node >/dev/null && echo "node installed, moving on..." || asktoinstallnode
# install pynvim
pip3 list | grep pynvim >/dev/null && echo "pynvim installed, moving on..." || installpynvim
if [ -a "$HOME/.local/share/nvim/site/pack/packer/start/packer.nvim" ]; then
if [ -e "$HOME/.local/share/nvim/site/pack/packer/start/packer.nvim" ]; then
echo 'packer already installed'
else
installpacker
fi
if [ -a "$HOME/.config/nvim/init.lua" ]; then
if [ -e "$HOME/.config/nvim/init.lua" ]; then
echo 'nvcode already installed'
else
# clone config down