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
This commit is contained in:
@@ -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:]]/}"
|
||||
|
||||
@@ -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:]]/}"
|
||||
|
||||
Reference in New Issue
Block a user