From b3b6a93a73084dc0992a55c54bfd9fc70f1ce23f Mon Sep 17 00:00:00 2001 From: aitbc Date: Tue, 26 May 2026 09:44:38 +0200 Subject: [PATCH] fix: remove redundant sudo commands from setup.sh - Removed sudo from Node.js installation commands (curl ... | bash -) - Script already runs as root (check_root enforced at start) - Redundant sudo commands are unnecessary when script has root privileges - Applied to both apt-get and yum package managers --- scripts/setup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/setup.sh b/scripts/setup.sh index f2e6460c..fc9c47fb 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -60,12 +60,12 @@ check_prerequisites() { ;; node) # Install Node.js 24.x from NodeSource - curl -fsSL https://deb.nodesource.com/setup_24.x | sudo bash - + curl -fsSL https://deb.nodesource.com/setup_24.x | bash - apt-get install -y nodejs ;; npm) # npm comes with nodejs - curl -fsSL https://deb.nodesource.com/setup_24.x | sudo bash - + curl -fsSL https://deb.nodesource.com/setup_24.x | 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 | sudo bash - + curl -fsSL https://rpm.nodesource.com/setup_24.x | bash - yum install -y nodejs else error "Unsupported package manager. Please install manually: ${missing[*]}"