You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hooks run with an empty environment except GIT_DIR and GIT_WORK_TREE #13
). Passing an $env array to proc_open() replaces the environment, so PATH, HOME, USER, LANG, SSH_AUTH_SOCK and everything else from the PHP process are missing in the hook. git passes its own environment through and adds the GIT_* variables.
(The PATH shown is the shell's built-in default because the variable is unset; HOME is empty.) Hooks that call tools from a user or project PATH (vendor/bin, node_modules/.bin, version managers) or rely on HOME fail or behave differently than under git.
Expected
The hook inherits the PHP process environment (getenv()) with GIT_DIR and GIT_WORK_TREE added or overridden.
Activity