-
Notifications
You must be signed in to change notification settings - Fork 708
Description
Summary
The non-interactive-env hook prepends environment variables to all git commands, regardless of session context. I wanted to clarify whether this is intended behavior.
Observed Behavior
When running any git command through the bash tool, the hook prepends env vars:
export CI=true DEBIAN_FRONTEND=noninteractive GIT_TERMINAL_PROMPT=0 ... ; git statusThis happens in all contexts - both headless CI runs and interactive TUI sessions.
Question
I noticed that src/hooks/non-interactive-env/detector.ts defines an isNonInteractive() function with logic to detect CI environments, GitHub Actions, and non-TTY sessions. However, this function doesn't appear to be called anywhere - the hook always applies regardless of environment.
Is this intentional? I initially expected the hook would only activate in non-interactive contexts (CI, headless runs), but perhaps the "non-interactive-env" name refers to what it enforces rather than when it applies.
Just wanted to clarify before assuming it's unintended.