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
I have a pre-commit git hook with a Docker command like:
docker compose exec -T -u ...
When trying to commit files in GitHub Desktop I get an error from the hook "docker: command not found". Committing files from the command line works fine. On further investigation, it looks like /usr/local/bin is missing from my PATH when git hooks run from GitHub Desktop. Any ideas how to resolve this?
The support is experimental and currently limited to our beta channel. While we believe that this release resolved this issue we're looking for real-world feedback so if you have the ability we'd appreciate it if you could download our beta channel and give it a spin. Ensure the experimental hooks support it's enabled by going to Settings -> Git -> Hooks and making sure the "Load Git hook environment variables from shell" is ticked.
Bump on this to get fixed on Github's end. It would be much more ideal to automate adding the env variable to PATH upon installation of GH Desktop if that's possible :)
The support is experimental and currently limited to our beta channel. While we believe that this release resolved this issue we're looking for real-world feedback so if you have the ability we'd appreciate it if you could download our beta channel and give it a spin. Ensure the experimental hooks support it's enabled by going to Settings -> Git -> Hooks and making sure the "Load Git hook environment variables from shell" is ticked.
Activity
dong-brian commentedon Jul 8, 2022
https://github.community/t/github-desktop-seems-to-be-using-the-wrong-path-variable/251248/4
This workaround worked for me
younkim commentedon Sep 14, 2022
@gilbitron Did you have any luck resolving this?
gilbitron commentedon Sep 14, 2022
@younkim I just brute-forced it:
sumitramanga commentedon May 24, 2023
Bump on this to get fixed on Github's end. It would be much more ideal to automate adding the env variable to PATH upon installation of GH Desktop if that's possible :)
niik commentedon Jan 14, 2026
Yesterday we shipped GitHub Desktop 3.5.5-beta1 to our beta channel with improved support for hooks related to committing.
The support is experimental and currently limited to our beta channel. While we believe that this release resolved this issue we're looking for real-world feedback so if you have the ability we'd appreciate it if you could download our beta channel and give it a spin. Ensure the experimental hooks support it's enabled by going to Settings -> Git -> Hooks and making sure the "Load Git hook environment variables from shell" is ticked.