fix(installer): replace confirmation prompt with 5-second countdown

curl | bash pipes stdin so read gets EOF and returns non-zero, which
set -euo pipefail treats as an error and aborts immediately. Replaced
the interactive prompt with a sleep 5 countdown — works whether the
script is piped or run directly.

Bumps version to 0.6.3.
This commit is contained in:
NixReaper
2026-04-12 04:44:07 -05:00
parent 501f94b7e8
commit 17b0becc82
4 changed files with 11 additions and 5 deletions
+7
View File
@@ -6,6 +6,13 @@ Pre-1.0 versions treat MINOR as feature releases and PATCH as bug fixes.
---
## [0.6.3] — 2026-04-12
### Bug Fixes
- **`install.sh` aborts immediately when piped via `curl | bash`** — Interactive confirmation prompt (`read`) received EOF from the pipe and exited non-zero, causing `set -euo pipefail` to kill the script before installation began. Replaced the prompt entirely with a 5-second countdown (`sleep 5`) so the installer works correctly whether piped or run from a file.
---
## [0.6.2] — 2026-04-12
### Bug Fixes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "nixpanel-server",
"version": "0.6.2",
"version": "0.6.3",
"private": true,
"workspaces": [
"server",
+2 -3
View File
@@ -95,9 +95,8 @@ echo " Admin username : $ADMIN_USER"
echo " Admin email : $ADMIN_EMAIL"
echo " Admin password : $([ "$GENERATED_PASS" = "true" ] && echo "<auto-generated>" || echo "$ADMIN_PASS")"
echo ""
read -r -p "Continue? [Y/n] " CONFIRM < /dev/tty || CONFIRM="Y"
CONFIRM="${CONFIRM:-Y}"
[[ "$CONFIRM" =~ ^[Yy]$ ]] || { echo "Aborted."; exit 0; }
echo " Starting in 5 seconds — press Ctrl+C to abort."
sleep 5
# ── Logging ───────────────────────────────────────────────────────────────────
mkdir -p /var/log/nixpanel
+1 -1
View File
@@ -73,7 +73,7 @@ export async function buildApp() {
fastify.get('/api/health', async () => ({
status: 'ok',
version: '0.6.2',
version: '0.6.3',
timestamp: new Date().toISOString(),
}))