Skip to content

Commit 68bc0f0

Browse files
authored
Don't install nodejs repo with sudo on Ubuntu (hestiacp#3791)
* Do not use sudo when installing NodeJS on Ubuntu * Add missing npm package requirement
1 parent cdb9c5a commit 68bc0f0

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

bin/v-update-sys-hestia-git

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,8 @@ check_hestia_demo_mode
3030
if [ -z $(which "node") ]; then
3131
read -p "NodeJS not found. Install now to proceed? [Y/n] " answer
3232
if [ "$answer" = 'y' ] || [ "$answer" = 'Y' ]; then
33-
if [ "$OS_TYPE" = "Debian" ]; then
34-
# Debian
35-
curl -fsSL "https://deb.nodesource.com/setup_$nodejs_ver.x" | bash - &&\
36-
apt-get install -y nodejs
37-
else
38-
# Ubuntu
39-
curl -fsSL "https://deb.nodesource.com/setup_$nodejs_ver.x" | sudo -E bash - &&\
40-
sudo apt-get install -y nodejs
41-
fi
33+
curl -fsSL "https://deb.nodesource.com/setup_$nodejs_ver.x" | bash - &&\
34+
sudo apt-get install -y nodejs
4235
else
4336
exit 0
4437
fi

0 commit comments

Comments
 (0)