Skip to content

Commit

Permalink
Don't install nodejs repo with sudo on Ubuntu (#3791)
Browse files Browse the repository at this point in the history
* Do not use sudo when installing NodeJS on Ubuntu
* Add missing npm package requirement
  • Loading branch information
jaapmarcus committed Jul 17, 2023
1 parent cdb9c5a commit 68bc0f0
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions bin/v-update-sys-hestia-git
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 68bc0f0

Please sign in to comment.