fix(coding-agent): emit clap-compatible CI=true and honor PI_BASH_NO_CI

The per-command non-interactive env hardcoded an unguarded CI=1, which clap parses as a strict boolean and rejects (breaking e.g. tauri android build). It also overrode the session env, so the documented PI_BASH_NO_CI opt-out never reached bash-tool commands.

buildNonInteractiveEnv now injects CI=true and strips CI when PI_BASH_NO_CI/CLAUDE_BASH_NO_CI is set, matching buildSpawnEnv in procmgr.ts.

Fixes #8229
This commit is contained in:
roboomp
2026-08-11 09:01:33 +00:00
parent 45e12e5bb7
commit 43f30b8a83
4 changed files with 34 additions and 4 deletions
+1 -1
View File
@@ -140,7 +140,7 @@ The per-command child environment is then built by `buildNonInteractiveEnv()` (`
- pagers disabled (`PAGER=cat`, `GIT_PAGER=cat`, … and `LESS=FRX`),
- editor prompts disabled (`GIT_EDITOR=true`, `EDITOR=true`, `VISUAL=true`),
- terminal/credential prompts reduced (`TERM=dumb`, `GIT_TERMINAL_PROMPT=0`, `SSH_ASKPASS=/usr/bin/false`, `NO_COLOR=1`, `CI=1`),
- terminal/credential prompts reduced (`TERM=dumb`, `GIT_TERMINAL_PROMPT=0`, `SSH_ASKPASS=/usr/bin/false`, `NO_COLOR=1`, `CI=true` unless `PI_BASH_NO_CI`/`CLAUDE_BASH_NO_CI` is set),
- package-manager/tooling automation flags for non-interactive behavior (npm/pnpm/yarn/pip/cargo/terraform/gh, …),
- on Windows, UTF-8 locale/codepage defaults are added when absent.