2 Commits
Author SHA1 Message Date
NixReaper 3902935f60 fix(install): read from /dev/tty so curl | bash confirmation prompt works, bump v0.5.2
set -euo pipefail causes the script to exit when read gets EOF from
the curl pipe instead of an interactive terminal. Fix by appending
'< /dev/tty || CONFIRM=Y' so the prompt reads from the actual terminal
regardless of how the script was invoked.
2026-04-12 04:39:14 -05:00
NixReaper da55367039 fix(install): remove --silent from build steps, clean node_modules before install, bump v0.5.1 2026-04-11 16:15:53 -05:00
4 changed files with 24 additions and 7 deletions
+14
View File
@@ -6,6 +6,20 @@ Pre-1.0 versions treat MINOR as feature releases and PATCH as bug fixes.
--- ---
## [0.5.2] — 2026-04-11
### Bug Fixes
- **`curl | bash` aborts immediately at confirmation prompt** — `set -euo pipefail` caused the script to exit when `read` received EOF from the pipe instead of a terminal. Fixed by reading from `/dev/tty` directly so the prompt works correctly whether the script is piped or run from a file.
---
## [0.5.1] — 2026-04-11
### Bug Fixes
- **`install.sh` build steps used `--silent`** — errors during `npm install` and frontend/server builds were suppressed, making failures invisible. Removed `--silent` from all build commands. Also added `rm -rf node_modules package-lock.json` before `npm install` to ensure a clean platform-correct install, consistent with `update.sh`.
---
## [0.5.0] — 2026-04-11 ## [0.5.0] — 2026-04-11
### Bug Fixes ### Bug Fixes
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "nixpanel-server", "name": "nixpanel-server",
"version": "0.5.0", "version": "0.5.2",
"private": true, "private": true,
"workspaces": [ "workspaces": [
"server", "server",
+8 -5
View File
@@ -82,6 +82,8 @@ if [[ -z "$ADMIN_EMAIL" ]]; then
ADMIN_EMAIL="admin@$(hostname -f 2>/dev/null || echo localhost)" ADMIN_EMAIL="admin@$(hostname -f 2>/dev/null || echo localhost)"
fi fi
# Redirect all interactive reads to /dev/tty so curl | bash works correctly
MARIADB_ROOT_PASS=$(openssl rand -base64 24 | tr -dc 'a-zA-Z0-9' | head -c 24) MARIADB_ROOT_PASS=$(openssl rand -base64 24 | tr -dc 'a-zA-Z0-9' | head -c 24)
JWT_SECRET=$(gen_secret) JWT_SECRET=$(gen_secret)
JWT_REFRESH_SECRET=$(gen_secret) JWT_REFRESH_SECRET=$(gen_secret)
@@ -93,7 +95,7 @@ echo " Admin username : $ADMIN_USER"
echo " Admin email : $ADMIN_EMAIL" echo " Admin email : $ADMIN_EMAIL"
echo " Admin password : $([ "$GENERATED_PASS" = "true" ] && echo "<auto-generated>" || echo "$ADMIN_PASS")" echo " Admin password : $([ "$GENERATED_PASS" = "true" ] && echo "<auto-generated>" || echo "$ADMIN_PASS")"
echo "" echo ""
read -r -p "Continue? [Y/n] " CONFIRM read -r -p "Continue? [Y/n] " CONFIRM < /dev/tty || CONFIRM="Y"
CONFIRM="${CONFIRM:-Y}" CONFIRM="${CONFIRM:-Y}"
[[ "$CONFIRM" =~ ^[Yy]$ ]] || { echo "Aborted."; exit 0; } [[ "$CONFIRM" =~ ^[Yy]$ ]] || { echo "Aborted."; exit 0; }
@@ -547,7 +549,8 @@ success ".env written"
# ── npm install ─────────────────────────────────────────────────────────────── # ── npm install ───────────────────────────────────────────────────────────────
step "Installing Node.js dependencies" step "Installing Node.js dependencies"
cd "$INSTALL_DIR" cd "$INSTALL_DIR"
npm install --silent rm -rf node_modules package-lock.json
npm install
success "npm dependencies installed" success "npm dependencies installed"
# ── Prisma generate + db push ───────────────────────────────────────────────── # ── Prisma generate + db push ─────────────────────────────────────────────────
@@ -571,10 +574,10 @@ success "Admin account and default packages seeded"
# ── Build ───────────────────────────────────────────────────────────────────── # ── Build ─────────────────────────────────────────────────────────────────────
step "Building frontends and server" step "Building frontends and server"
cd "$INSTALL_DIR" cd "$INSTALL_DIR"
npm run build --workspace=nixserver --silent npm run build --workspace=nixserver
npm run build --workspace=nixclient --silent npm run build --workspace=nixclient
cd "$INSTALL_DIR/server" cd "$INSTALL_DIR/server"
npm run build --silent npm run build
success "Build complete" success "Build complete"
# ── Set web-readable permissions on frontend assets ─────────────────────────── # ── Set web-readable permissions on frontend assets ───────────────────────────
+1 -1
View File
@@ -73,7 +73,7 @@ export async function buildApp() {
fastify.get('/api/health', async () => ({ fastify.get('/api/health', async () => ({
status: 'ok', status: 'ok',
version: '0.5.0', version: '0.5.2',
timestamp: new Date().toISOString(), timestamp: new Date().toISOString(),
})) }))