diff --git a/scripts/install.sh b/scripts/install.sh index 8666e4f9..93cdefe9 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -63,6 +63,8 @@ if [ "$OS" = "Mac" ]; then log "Handling macOS specific setup" handle_macos || log_error "macOS setup failed" 1 else + # Explicit kickoff log for LND so the flow is clear in the install log + log "${PRIMARY_COLOR}Installing${RESET_COLOR} ${SECONDARY_COLOR}LND${RESET_COLOR}..." lnd_output=$(install_lnd) install_result=$? @@ -71,15 +73,15 @@ else fi lnd_status=$(echo "$lnd_output" | grep "LND_STATUS:" | cut -d':' -f2) - + case $lnd_status in 0) log "LND fresh installation completed successfully." ;; 1) log "LND upgrade completed successfully." ;; 2) log "LND is already up-to-date. No action needed." ;; *) log "WARNING: Unexpected status from install_lnd: $lnd_status" ;; esac - - install_nodejs || log_error "Failed to install Node.js" 1 + + install_nodejs || log_error "Failed to install Node.js" 1 # Run install_lightning_pub and capture its exit code directly. # We expect specific exit codes (0 for success, 2 for no update), so we handle them. diff --git a/scripts/install_lightning_pub.sh b/scripts/install_lightning_pub.sh index fe2cb990..4eb4b317 100755 --- a/scripts/install_lightning_pub.sh +++ b/scripts/install_lightning_pub.sh @@ -16,8 +16,6 @@ install_lightning_pub() { USER_HOME=$HOME USER_NAME=$(whoami) fi - - log "${PRIMARY_COLOR}Installing${RESET_COLOR} ${SECONDARY_COLOR}Lightning.Pub${RESET_COLOR}..." wget -q $REPO_URL -O $USER_HOME/lightning_pub.tar.gz > /dev/null 2>&1 || { log "${PRIMARY_COLOR}Failed to download Lightning.Pub.${RESET_COLOR}" @@ -55,7 +53,7 @@ install_lightning_pub() { return 2 fi - log "Upgrading existing Lightning.Pub installation..." + log "${PRIMARY_COLOR}Upgrading${RESET_COLOR} ${SECONDARY_COLOR}Lightning.Pub${RESET_COLOR} installation..." upgrade_status=100 log "Backing up user data before upgrade..." @@ -90,7 +88,7 @@ install_lightning_pub() { else # --- FRESH INSTALL PATH --- # This path is only taken if the ~/lightning_pub directory does not exist. - log "Performing fresh Lightning.Pub installation..." + log "${PRIMARY_COLOR}Installing${RESET_COLOR} ${SECONDARY_COLOR}Lightning.Pub${RESET_COLOR}..." upgrade_status=0 mv "$USER_HOME/lightning_pub_temp" "$USER_HOME/lightning_pub" fi diff --git a/scripts/install_nodejs.sh b/scripts/install_nodejs.sh index a9c89e7a..2eaf19d1 100755 --- a/scripts/install_nodejs.sh +++ b/scripts/install_nodejs.sh @@ -36,10 +36,8 @@ install_nodejs() { log "Node.js is not installed. ${PRIMARY_COLOR}Installing the LTS version...${RESET_COLOR}" fi - # Keep only the download progress bar; hide all other chatter - if ! bash -c "source ${NVM_DIR}/nvm.sh && nvm install --lts" \ - 1>/dev/null \ - 2> >(grep -E '%\[' >&2); then + # Silence all nvm output to keep installer logs clean + if ! bash -c "source ${NVM_DIR}/nvm.sh && nvm install --lts" >/dev/null 2>&1; then log "${PRIMARY_COLOR}Failed to install Node.js.${RESET_COLOR}" return 1 fi