summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbouzar Parvan <[email protected]>2021-07-13 19:57:38 +0430
committerGitHub <[email protected]>2021-07-13 11:27:38 -0400
commitcae6b7da4c8ce4ae2a0923990e6b198f092dfd0e (patch)
tree1fe42f964d9e659420bd2150428479e889566637
parente78b5845c1418617af6bee67721fff8d8e4398fa (diff)
fix the installation stuck on Ok to remove (#912)
-rw-r--r--README.md9
-rwxr-xr-xutils/installer/install.sh7
2 files changed, 16 insertions, 0 deletions
diff --git a/README.md b/README.md
index 7b835b00..fd2cefc2 100644
--- a/README.md
+++ b/README.md
@@ -33,6 +33,15 @@ If you help to develop Lunarvim, you can install a specific branch branch direct
LVBRANCH=rolling bash <(curl -s https://raw.githubusercontent.com/ChristianChiarulli/lunarvim/rolling/utils/installer/install.sh)
```
+If your installation is stuck on `Ok to remove? [y/N]`, it means there are some leftovers, \
+you can run the script with `--overwrite` but be warned this will remove the following folder:
+- `~/.config/nvim`
+- `~/.cache/nvim`
+- `~/.local/share/nvim/site/pack/packer`
+```bash
+curl -s https://raw.githubusercontent.com/ChristianChiarulli/lunarvim/rolling/utils/installer/install.sh| LVBRANCH=rolling bash -s -- --overwrite
+```
+
## Installing LSP for your language
diff --git a/utils/installer/install.sh b/utils/installer/install.sh
index 8d87260e..0473bbab 100755
--- a/utils/installer/install.sh
+++ b/utils/installer/install.sh
@@ -182,6 +182,13 @@ installextrapackages() {
# Welcome
echo 'Installing LunarVim'
+if [[ $* == *--overwrite* ]]; then
+ echo '!!Warning!! -> Removing all nvim related config because of the --overwrite flag'
+ rm -rf "$HOME/.config/nvim"
+ rm -rf "$HOME/.cache/nvim"
+ rm -rf "$HOME/.local/share/nvim/site/pack/packer"
+fi
+
# move old nvim directory if it exists
[ -d "$HOME/.config/nvim" ] && moveoldnvim