Skip to content

non-interactive-env hook: clarification on intended behavior #522

@codyw912

Description

@codyw912

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 status

This 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions