Sfoglia il codice sorgente

fix(gamedig): stop npm waiting on a registry that does not answer (#5128)

npm install now skips its audit request, which was the only thing it waited on with gamedig already installed. npm update also skips it and gives up after one 10 second attempt per request instead of npm's default 5 minutes with 2 retries. It runs on every monitor with its output hidden, so a silent registry stalled monitor with no sign why.

Fixes #5127
Daniel Gibbs 4 giorni fa
parent
commit
0fb301a249
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      lgsm/modules/check_gamedig.sh

+ 2 - 2
lgsm/modules/check_gamedig.sh

@@ -13,11 +13,11 @@ if [ "$(command -v node)" ] && [ "$(command -v npm)" ] && [ "$(node -v | cut -d
 	fn_script_log_info "Installing Gamedig"
 	cd "${lgsmdir}" || exit
 	curl -L -o package.json "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/package.json"
-	npm install
+	npm install --no-audit
 elif [ "$(command -v node)" ] && [ "$(command -v npm)" ] && [ "$(node -v | cut -d 'v' -f 2 | cut -d '.' -f 1)" -ge 16 ]; then
 	cd "${lgsmdir}" || exit
 	curl -s -L -o package.json "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/package.json"
-	npm update > /dev/null 2>&1
+	npm update --no-audit --fetch-timeout=10000 --fetch-retries=0 > /dev/null 2>&1
 else
 	fn_script_log_info "Install Node.js and NPM to enable Gamedig"
 fi