forked from Ponysearch/Ponysearch
[fix] make nvm.clean - don't raise error when NVM is not installed
Issue was:: $ LANG=C make nvm.clean INFO: NVM is not installed make: *** [Makefile:99: nvm.clean] Error 42 Now:: $ LANG=C make nvm.clean CLEAN [NVM] not installed BTW: change info_msg to build_msg Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
e82e37ce6d
commit
48752815ed
1 changed files with 8 additions and 5 deletions
|
@ -120,14 +120,17 @@ nvm.install() {
|
||||||
|
|
||||||
nvm.clean() {
|
nvm.clean() {
|
||||||
if ! nvm.is_installed; then
|
if ! nvm.is_installed; then
|
||||||
info_msg "NVM is not installed"
|
build_msg CLEAN "[NVM] not installed"
|
||||||
return 42
|
return
|
||||||
fi
|
fi
|
||||||
if ! nvm.is_local; then
|
if ! nvm.is_local; then
|
||||||
info_msg "can't remove NVM from ${NVM_DIR}"
|
build_msg CLEAN "[NVM] can't remove nvm from ${NVM_DIR}"
|
||||||
return 42
|
return
|
||||||
|
fi
|
||||||
|
if [ -n "${NVM_DIR}" ]; then
|
||||||
|
build_msg CLEAN "[NVM] drop $(realpath --relative-to=. "${NVM_DIR}")/"
|
||||||
|
rm -rf "${NVM_DIR}"
|
||||||
fi
|
fi
|
||||||
rm -rf "${NVM_DIR}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nvm.status(){
|
nvm.status(){
|
||||||
|
|
Loading…
Reference in a new issue