only check snap curl

This commit is contained in:
shocknet-justin 2025-11-04 15:19:41 -05:00
parent 3502858ce2
commit ddda6030ba

View file

@ -8,19 +8,7 @@ install_nodejs() {
log "${PRIMARY_COLOR}Checking${RESET_COLOR} for Node.js..." log "${PRIMARY_COLOR}Checking${RESET_COLOR} for Node.js..."
MINIMUM_VERSION="18.0.0" MINIMUM_VERSION="18.0.0"
# Check for curl (required by nvm installer) # Check for snap curl which cannot access hidden folders, nvm falls back to wget if curl is not installed
if ! command -v curl &> /dev/null; then
log "ERROR: curl is required for Node.js installation"
log ""
log "Please install curl first:"
log " Debian/Ubuntu: sudo apt install curl"
log " Fedora/RHEL: sudo dnf install curl"
log " Arch: sudo pacman -S curl"
log ""
exit 1
fi
# Check for snap curl which cannot access hidden folders
if snap list 2>/dev/null | grep -q "^curl "; then if snap list 2>/dev/null | grep -q "^curl "; then
log "ERROR: Snap curl detected" log "ERROR: Snap curl detected"
log "" log ""