From 3502858ce2ebdc1844e829de7ec75ed708f3753a Mon Sep 17 00:00:00 2001 From: shocknet-justin Date: Tue, 4 Nov 2025 15:15:50 -0500 Subject: [PATCH] curl checks --- scripts/install.sh | 2 +- scripts/install_nodejs.sh | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/scripts/install.sh b/scripts/install.sh index 383298ed..90320715 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -13,7 +13,7 @@ log() { SCRIPT_VERSION="0.2.3 REPO="shocknet/Lightning.Pub" -BRANCH="master" +BRANCH="wizard-update cleanup() { log "Cleaning up temporary files..." diff --git a/scripts/install_nodejs.sh b/scripts/install_nodejs.sh index 06601a20..ca4e196a 100755 --- a/scripts/install_nodejs.sh +++ b/scripts/install_nodejs.sh @@ -8,6 +8,30 @@ install_nodejs() { log "${PRIMARY_COLOR}Checking${RESET_COLOR} for Node.js..." MINIMUM_VERSION="18.0.0" + # Check for curl (required by nvm installer) + 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 + log "ERROR: Snap curl detected" + log "" + log "Snap curl cannot access hidden folders needed for Node.js installation." + log "Please remove snap curl and install native curl:" + log " sudo snap remove curl" + log " sudo apt install curl" + log "" + exit 1 + fi + # Load nvm if it already exists export NVM_DIR="${NVM_DIR}" [ -s "${NVM_DIR}/nvm.sh" ] && \. "${NVM_DIR}/nvm.sh"