fix: use sudo bash - for Node.js installation
- Updated Node.js installation commands to use sudo bash - - Ensures proper execution when script is run with sudo - Applied to both apt-get (deb.nodesource.com) and yum (rpm.nodesource.com) - Follows standard NodeSource installation pattern
This commit is contained in:
@@ -60,12 +60,12 @@ check_prerequisites() {
|
||||
;;
|
||||
node)
|
||||
# Install Node.js 24.x from NodeSource
|
||||
curl -fsSL https://deb.nodesource.com/setup_24.x | bash -
|
||||
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo bash -
|
||||
apt-get install -y nodejs
|
||||
;;
|
||||
npm)
|
||||
# npm comes with nodejs
|
||||
curl -fsSL https://deb.nodesource.com/setup_24.x | bash -
|
||||
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo bash -
|
||||
apt-get install -y nodejs
|
||||
;;
|
||||
esac
|
||||
@@ -73,7 +73,7 @@ check_prerequisites() {
|
||||
elif command -v yum >/dev/null 2>&1; then
|
||||
yum install -y python3 python3-pip git systemd
|
||||
# Install Node.js 24.x
|
||||
curl -fsSL https://rpm.nodesource.com/setup_24.x | bash -
|
||||
curl -fsSL https://rpm.nodesource.com/setup_24.x | sudo bash -
|
||||
yum install -y nodejs
|
||||
else
|
||||
error "Unsupported package manager. Please install manually: ${missing[*]}"
|
||||
|
||||
Reference in New Issue
Block a user