File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ case $yn in
261261
262262 nv=0
263263 # nv2=""
264- nv2=` dpkg -s nodejs | grep Version | cut -d ' ' -f 2`
264+ nv2=` dpkg -s nodejs 2> /dev/null | grep Version | cut -d ' ' -f 2`
265265 nrv=` echo $NODERED_VERSION | cut -d " ." -f1`
266266
267267 if [[ " $APTOK " == " false" ]]; then
@@ -485,8 +485,13 @@ case $yn in
485485 echo -ne " Remove old version of Node.js \033[1;32m\u2714\033[0m $nv2 \r\n"
486486 echo " Grab the LTS bundle" | $SUDO tee -a /var/log/nodered-install.log >> /dev/null
487487 echo -ne " Install Node.js $NODE_VERSION LTS \r"
488- # use the official script to install for other debian platforms
489488
489+ # block debian nodejs install
490+ echo " Package: nodejs" | $SUDO tee /etc/apt/preferences.d/nodejs.pref >> /dev/null
491+ echo " Pin: release a=stable-security" | $SUDO tee -a /etc/apt/preferences.d/nodejs.pref >> /dev/null
492+ echo " Pin-Priority: -1" | $SUDO tee -a /etc/apt/preferences.d/nodejs.pref >> /dev/null
493+
494+ # use the official script to install for other debian platforms
490495 $SUDO apt install -y ca-certificates curl gnupg 2>&1 | $SUDO tee -a /var/log/nodered-install.log >> /dev/null
491496 $SUDO mkdir -p /etc/apt/keyrings 2>&1 | $SUDO tee -a /var/log/nodered-install.log >> /dev/null
492497 curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | $SUDOE gpg --batch --yes --dearmor -o /etc/apt/keyrings/nodesource.gpg 2>&1 | $SUDO tee -a /var/log/nodered-install.log >> /dev/null
You can’t perform that action at this time.
0 commit comments