From 23bf383a37492308e7ca398ed13b50b8196df71c Mon Sep 17 00:00:00 2001 From: Joakim Persson Date: Fri, 8 May 2026 00:36:02 +0200 Subject: [PATCH] Fix mempalace init hang on stdin in docker run -it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mempalace init has an interactive 'Mine this directory now? [Y/n]' prompt at the end that --yes does not auto-answer in all paths (notably empty or near-empty workspaces). The entrypoint redirected stdout/stderr to /dev/null but left stdin connected to the TTY. When invoked from 'docker run -it' the process blocked forever on stdin with 0% CPU, silently — the user's symptom of 'still hangs at Initializing MemPalace for workspace'. Fix: redirect stdin from /dev/null too. EOF on stdin makes the prompt fall through to its default (skip), and the process exits cleanly. Verified locally: fresh-container start now completes in 1.3 seconds (vs hanging indefinitely). --- entrypoint-user.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/entrypoint-user.sh b/entrypoint-user.sh index 6bc22b3..9be6ff4 100644 --- a/entrypoint-user.sh +++ b/entrypoint-user.sh @@ -25,7 +25,12 @@ if command -v mempalace &>/dev/null && [ -d /workspace ]; then PALACE_DIR="${HOME}/.mempalace" if [ ! -d "$PALACE_DIR/palace" ]; then echo "Initializing MemPalace for workspace (non-interactive)..." - mempalace init --yes /workspace >/dev/null 2>&1 || true + # /dev/null 2>&1 || true fi fi