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" ;;
|
*) msg_error "Invalid input" ;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
echo -e "${TAB}Enter MongoDB connection URL (default: mongodb://localhost:27017): "
|
read -r -p "Enter MongoDB connection URL (default: mongodb://localhost:27017): " MONGO_URL_INPUT
|
||||||
read -r MONGO_URL_INPUT
|
|
||||||
MONGO_URL="${MONGO_URL_INPUT:-mongodb://localhost:27017}"
|
MONGO_URL="${MONGO_URL_INPUT:-mongodb://localhost:27017}"
|
||||||
echo -e "${TAB}Enter port number (default: ${DEFAULT_PORT}): "
|
read -r -p "Enter port number (default: ${DEFAULT_PORT}): " PORT_INPUT
|
||||||
read -r PORT_INPUT
|
|
||||||
PORT="${PORT_INPUT:-$DEFAULT_PORT}"
|
PORT="${PORT_INPUT:-$DEFAULT_PORT}"
|
||||||
read -r -p "Install ${APP}? (y/n): " answer
|
read -r -p "Install ${APP}? (y/n): " answer
|
||||||
answer="${answer//[[:space:]]/}"
|
answer="${answer//[[:space:]]/}"
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ function install_mqttx() {
|
|||||||
|
|
||||||
msg_info "Building ${APP}"
|
msg_info "Building ${APP}"
|
||||||
cd "$APP_DIR/web"
|
cd "$APP_DIR/web"
|
||||||
$STD yarn install --frozen-lockfile
|
$STD yarn install --frozen-lockfile --ignore-engines
|
||||||
$STD yarn build
|
$STD yarn build
|
||||||
msg_ok "Built ${APP}"
|
msg_ok "Built ${APP}"
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ function update_mqttx() {
|
|||||||
msg_info "Updating ${APP}"
|
msg_info "Updating ${APP}"
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "mqttx" "$REPO" "tarball" "latest" "$APP_DIR"
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "mqttx" "$REPO" "tarball" "latest" "$APP_DIR"
|
||||||
cd "$APP_DIR/web"
|
cd "$APP_DIR/web"
|
||||||
$STD yarn install --frozen-lockfile
|
$STD yarn install --frozen-lockfile --ignore-engines
|
||||||
$STD yarn build
|
$STD yarn build
|
||||||
systemctl reload nginx
|
systemctl reload nginx
|
||||||
msg_ok "${APP} updated"
|
msg_ok "${APP} updated"
|
||||||
@@ -127,8 +127,7 @@ if is_installed; then
|
|||||||
*) msg_error "Invalid input" ;;
|
*) msg_error "Invalid input" ;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
echo -e "${TAB}Enter port number (default: ${DEFAULT_PORT}): "
|
read -r -p "Enter port number (default: ${DEFAULT_PORT}): " PORT_INPUT
|
||||||
read -r PORT_INPUT
|
|
||||||
PORT="${PORT_INPUT:-$DEFAULT_PORT}"
|
PORT="${PORT_INPUT:-$DEFAULT_PORT}"
|
||||||
read -r -p "Install ${APP}? (y/n): " answer
|
read -r -p "Install ${APP}? (y/n): " answer
|
||||||
answer="${answer//[[:space:]]/}"
|
answer="${answer//[[:space:]]/}"
|
||||||
|
|||||||
Reference in New Issue
Block a user