Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: stop update.sh/setup.sh hanging on slash-do prompt

[._.]/ Adam Eivy7fd02e11712d
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index f6d502a273..1241294b71 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -1530,6 +1530,21 @@
## Fixed
+- **`update.sh` / `setup.sh` (+ PowerShell siblings) no longer hang on
+ slash-do install when multiple AI environments are detected.** The
+ `npx --yes slash-do@latest` call inside the four install/update scripts
+ invokes `slash-do`'s CLI, which calls `readline.createInterface` to prompt
+ "select environments" whenever `detectInstalled()` finds more than one
+ recognized env on the box (any combination of `~/.claude`,
+ `~/.config/opencode`, `~/.gemini`, `~/.codex`). Because the scripts run
+ non-interactively (no TTY on stdin under the PortOS update executor),
+ readline waited forever and the update stalled at
+ `STEP:slash-do:running:Installing/updating slash-do commands...`. All four
+ scripts now pipe `a` (the CLI's "All of the above" answer) into stdin so
+ the prompt auto-selects every detected env; when 0 or 1 envs are
+ detected the prompt is skipped entirely and the piped `a` is harmlessly
+ ignored. Touches `update.sh`, `setup.sh`, `update.ps1`, `setup.ps1`.
+
- **Black ICE Terminal: active day/night toggle no longer renders a white moon
on bright green.** The settings theme picker uses `bg-port-accent
text-port-on-accent` to flag the active mode, but `--color-port-on-accent`
diff --git a/setup.ps1 b/setup.ps1
index 8afce82aa5..10fa21db40 100644
--- a/setup.ps1
+++ b/setup.ps1
@@ -85,7 +85,9 @@ if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
# user-global command pool.
Write-Host ""
Write-Host "Installing/updating slash-do commands (npx slash-do@latest)..." -ForegroundColor Yellow
-npx --yes slash-do@latest
+# Pipe "a" so slash-do's "multiple environments detected" prompt auto-selects
+# all detected envs instead of hanging on readline when stdin is not a TTY.
+"a" | & npx --yes slash-do@latest
if ($LASTEXITCODE -ne 0) {
Write-Host "⚠️ slash-do install failed — skipping (you can re-run later: npx slash-do@latest)" -ForegroundColor Yellow
$global:LASTEXITCODE = 0
diff --git a/setup.sh b/setup.sh
index 91b4eb9990..7040c04a61 100755
--- a/setup.sh
+++ b/setup.sh
@@ -44,7 +44,9 @@ echo ""
# user-global command pool current. Failures are non-fatal: PortOS still works
# without the global slash commands.
echo "Installing/updating slash-do commands (npx slash-do@latest)..."
-if ! npx --yes slash-do@latest; then
+# Pipe "a" so slash-do's "multiple environments detected" prompt auto-selects
+# all detected envs instead of hanging on readline when stdin is not a TTY.
+if ! echo a | npx --yes slash-do@latest; then
echo "⚠️ slash-do install failed — skipping (you can re-run later: npx slash-do@latest)"
fi
echo ""
diff --git a/update.ps1 b/update.ps1
index f88064c529..b15a54e8e7 100644
--- a/update.ps1
+++ b/update.ps1
@@ -215,8 +215,10 @@ Step "migrations" "done" "Migrations complete"
# Install/update slash-do commands. Replaces the previous interactive prompt
# with an always-on `npx slash-do@latest` call so the user-global command
# pool stays current across updates. Failures are non-fatal.
+# Pipe "a" so slash-do's "multiple environments detected" prompt auto-selects
+# all detected envs instead of hanging on readline (update.ps1 has no TTY).
Step "slash-do" "running" "Installing/updating slash-do commands..."
-Invoke-Logged npx --yes slash-do@latest
+"a" | & npx --yes slash-do@latest >> $UpdateLog 2>&1
if ($LASTEXITCODE -ne 0) {
Write-SafeHost "⚠️ slash-do install/update failed. Continuing (re-run later: npx slash-do@latest)." -ForegroundColor Yellow
$global:LASTEXITCODE = 0
diff --git a/update.sh b/update.sh
index 2eb28d5e73..ba7ae29c20 100755
--- a/update.sh
+++ b/update.sh
@@ -149,8 +149,10 @@ step "migrations" "done" "Migrations complete"
# pool stays current across updates without user intervention. Failures are
# non-fatal — the PR Reviewer schedule task is the only consumer and it
# fails gracefully if the binary is missing.
+# Pipe "a" so slash-do's "multiple environments detected" prompt auto-selects
+# all detected envs instead of hanging on readline (update.sh has no TTY).
step "slash-do" "running" "Installing/updating slash-do commands..."
-if ! run npx --yes slash-do@latest; then
+if ! echo a | run npx --yes slash-do@latest; then
log "⚠️ slash-do install/update failed. Continuing without it (re-run later: npx slash-do@latest)."
fi
step "slash-do" "done" "slash-do commands installed/updated"