From c366bf4726e30ad1d38bc6ffce80aa346bec13ad Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Tue, 7 Apr 2026 13:21:57 +0200 Subject: [PATCH] fix(addon): mqttx node engine compat + prompt formatting - Add --ignore-engines to yarn install (web/ requires Node 18 exactly, but works fine with Node 22 + --openssl-legacy-provider) - Fix prompt formatting: use read -r -p inline instead of echo + read - Apply same prompt fix to mongo-express addon --- tools/addon/mongo-express.sh | 6 ++---- tools/addon/mqttx.sh | 7 +++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/tools/addon/mongo-express.sh b/tools/addon/mongo-express.sh index 29747f65..1c5eda7c 100644 --- a/tools/addon/mongo-express.sh +++ b/tools/addon/mongo-express.sh @@ -151,11 +151,9 @@ if is_installed; then *) msg_error "Invalid input" ;; esac else - echo -e "${TAB}Enter MongoDB connection URL (default: mongodb://localhost:27017): " - read -r MONGO_URL_INPUT + read -r -p "Enter MongoDB connection URL (default: mongodb://localhost:27017): " MONGO_URL_INPUT MONGO_URL="${MONGO_URL_INPUT:-mongodb://localhost:27017}" - echo -e "${TAB}Enter port number (default: ${DEFAULT_PORT}): " - read -r PORT_INPUT + read -r -p "Enter port number (default: ${DEFAULT_PORT}): " PORT_INPUT PORT="${PORT_INPUT:-$DEFAULT_PORT}" read -r -p "Install ${APP}? (y/n): " answer answer="${answer//[[:space:]]/}" diff --git a/tools/addon/mqttx.sh b/tools/addon/mqttx.sh index ff8d1cf0..de029580 100644 --- a/tools/addon/mqttx.sh +++ b/tools/addon/mqttx.sh @@ -46,7 +46,7 @@ function install_mqttx() { msg_info "Building ${APP}" cd "$APP_DIR/web" - $STD yarn install --frozen-lockfile + $STD yarn install --frozen-lockfile --ignore-engines $STD yarn build msg_ok "Built ${APP}" @@ -108,7 +108,7 @@ function update_mqttx() { msg_info "Updating ${APP}" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "mqttx" "$REPO" "tarball" "latest" "$APP_DIR" cd "$APP_DIR/web" - $STD yarn install --frozen-lockfile + $STD yarn install --frozen-lockfile --ignore-engines $STD yarn build systemctl reload nginx msg_ok "${APP} updated" @@ -127,8 +127,7 @@ if is_installed; then *) msg_error "Invalid input" ;; esac else - echo -e "${TAB}Enter port number (default: ${DEFAULT_PORT}): " - read -r PORT_INPUT + read -r -p "Enter port number (default: ${DEFAULT_PORT}): " PORT_INPUT PORT="${PORT_INPUT:-$DEFAULT_PORT}" read -r -p "Install ${APP}? (y/n): " answer answer="${answer//[[:space:]]/}"