Back to Hooks
Non Interactive Env
Prevents shell commands from hanging by injecting environment variables that force non-interactive mode. This is particularly useful for tools like gi...
Non-Interactive Env
Description
Prevents shell commands from hanging by injecting environment variables that force non-interactive mode. This is particularly useful for tools like git or package managers that might otherwise prompt for user input (e.g., pagination, credentials).
Features
- Env Injection: Prepends
export CI=true DEBIAN_FRONTEND=noninteractive ...to commands. - Git Specific: Targets
gitcommands specifically to avoid modifying unrelated shell calls. - Banned Command Detection: Warns if known interactive-only commands (like
vi,nano,less) are attempted.
Trigger Events
tool.execute.before: Inspectsbashtool calls.
Configuration
Default Variables:
CI=trueDEBIAN_FRONTEND=noninteractiveGIT_TERMINAL_PROMPT=0GCM_INTERACTIVE=never