From 4a09000ca6007676ed53d18fb14fd41dd92fe5ec Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sun, 5 Sep 2021 19:38:18 -0400 Subject: [PATCH] installDeps.sh: Don't nuke `src/node_modules` on error Rationale: * Clearing out `src/node_modules` is unlikely to bring future success. * If there is an error, it's better to leave the filesystem alone so that the user can investigate the cause. * Deleting the directory on error is a surprising behavior. --- src/bin/installDeps.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/bin/installDeps.sh b/src/bin/installDeps.sh index 25a677b3a..66ad895c2 100755 --- a/src/bin/installDeps.sh +++ b/src/bin/installDeps.sh @@ -43,10 +43,7 @@ log "Installing dependencies..." { [ -d ep_etherpad-lite ] || ln -sf ../src ep_etherpad-lite; } && cd ep_etherpad-lite && npm ci --no-optional -) || { - rm -rf src/node_modules - exit 1 -} +) || exit 1 # Remove all minified data to force node creating it new log "Clearing minified cache..."