fix: a first run's typed answers reach the stack, not just docker/.env (release review)

Compose prefers the shell environment over the env file, so with
CODEMAN_APPDATA_PATH or CODEMAN_PORT preset, a different typed answer went into
docker/.env and the summary while the stack ran on the preset: state split
across two folders and the next plain start mounted another home. Setup now
unsets everything it wrote, so the file it just printed is what Compose reads.
The test stub honours that precedence, and the questions get their first test
through a real pty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer committed 2026-11-06 04:27:24 +01:00
1 parent 666e595dfc
commit af6fcb624b
2 files changed
+58 -12

No files matched your search

+4
View File
@@ -411,6 +411,10 @@ run_first_run_setup() {
setup_cases="$setup_appdata/codeman-cases"
write_env_file
first_run=1
# Compose prefers the shell environment over the env file, so a preset still
# exported here would beat a different typed answer: docker/.env and the
# summary would name one folder and port and the stack would run on another.
unset TZ CODEMAN_APPDATA_PATH CODEMAN_CASES_PATH CODEMAN_PORT CODEMAN_PASSWORD
if [[ -n "$generated_password" ]]; then
password_note="$generated_password (generated; shown again once Codeman is up)"