-
-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PATH not respected in hooks #1967
Comments
that is so weird. we use https://doc.rust-lang.org/std/process/struct.Command.html#method.new and it is supposed to inherit the parents env |
#1968 adds a unittest proving that a hook script has access to |
@Lykos153 can you export your environment in your hook for debug purposes like you see it happening in the referenced unittest. I cannot reproduce your problem |
Thank you very much for looking into it! And you're right. I realized that with zsh it is indeed working as expected. It only seems to happen using nushell. But what's strange is that it works with git but not with gitui. Whats the difference in how both call the hook? See https://asciinema.org/a/jXDeNAlsYFHs6TSlALE6KGDnr I will ask the nushell folks, too. |
very strange indeed. i am not using nushell. it seems for some reason the gitui process does not see the new version of the env |
closing in case we find new evidence |
Describe the bug
I use devenv and direnv to make some applications available on a per-directory basis by setting the PATH environment variable. I use it especially to provide project specific git hooks. However, when committing with gitui, those applications don't seem to be available.
To Reproduce
Steps to reproduce the behavior:
my-own-script
PATH
my-own-script
my-own-script
Expected behavior
gitui being able to see applications in the PATH
Context (please complete the following information):
The text was updated successfully, but these errors were encountered: