Răsfoiți Sursa

Don't install nodejs repo with sudo on Ubuntu (#3791)

* Do not use sudo when installing NodeJS on Ubuntu
* Add missing npm package requirement
Jaap Marcus 2 ani în urmă
părinte
comite
68bc0f0e90
1 a modificat fișierele cu 2 adăugiri și 9 ștergeri
  1. 2 9
      bin/v-update-sys-hestia-git

+ 2 - 9
bin/v-update-sys-hestia-git

@@ -30,15 +30,8 @@ check_hestia_demo_mode
 if [ -z $(which "node") ]; then
 	read -p "NodeJS not found. Install now to proceed? [Y/n] " answer
 	if [ "$answer" = 'y' ] || [ "$answer" = 'Y' ]; then
-		if [ "$OS_TYPE" = "Debian" ]; then
-			# Debian
-			curl -fsSL "https://deb.nodesource.com/setup_$nodejs_ver.x" | bash - &&\
-			apt-get install -y nodejs
-		else
-			# Ubuntu
-			curl -fsSL "https://deb.nodesource.com/setup_$nodejs_ver.x" | sudo -E bash - &&\
-			sudo apt-get install -y nodejs
-		fi
+		curl -fsSL "https://deb.nodesource.com/setup_$nodejs_ver.x" | bash - &&\
+		sudo apt-get install -y nodejs
 	else
 		exit 0
 	fi