summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarIT.de>2021-11-19 13:28:51 +0100
committerGitHub <noreply@github.com>2021-11-19 13:28:51 +0100
commitbe793f761259ee39f74e9ec1ba4b3a4a3037fe09 (patch)
tree5420cd967c8e9d30634ff3690094c5ad2b3739fb
parentf6bfc8f4615ba91f3c54687ae9f0dc828507573e (diff)
parent48752815ed5ea0689ed03bcd4b969a2c367de528 (diff)
downloadsearxng-be793f761259ee39f74e9ec1ba4b3a4a3037fe09.tar.gz
searxng-be793f761259ee39f74e9ec1ba4b3a4a3037fe09.zip
Merge pull request #519 from return42/fix-make-clean
[fix] make nvm.clean - don't raise error when NVM is not installed
-rwxr-xr-xutils/lib_nvm.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/utils/lib_nvm.sh b/utils/lib_nvm.sh
index c12be05cf..d35abef2a 100755
--- a/utils/lib_nvm.sh
+++ b/utils/lib_nvm.sh
@@ -120,14 +120,17 @@ nvm.install() {
nvm.clean() {
if ! nvm.is_installed; then
- info_msg "NVM is not installed"
- return 42
+ build_msg CLEAN "[NVM] not installed"
+ return
fi
if ! nvm.is_local; then
- info_msg "can't remove NVM from ${NVM_DIR}"
- return 42
+ build_msg CLEAN "[NVM] can't remove nvm from ${NVM_DIR}"
+ return
+ fi
+ if [ -n "${NVM_DIR}" ]; then
+ build_msg CLEAN "[NVM] drop $(realpath --relative-to=. "${NVM_DIR}")/"
+ rm -rf "${NVM_DIR}"
fi
- rm -rf "${NVM_DIR}"
}
nvm.status(){