log polish
This commit is contained in:
parent
3cca4b4053
commit
8850c65091
3 changed files with 9 additions and 11 deletions
|
|
@ -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=$?
|
||||
|
||||
|
|
@ -79,7 +81,7 @@ else
|
|||
*) 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.
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ install_lightning_pub() {
|
|||
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}"
|
||||
return 1
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue