-
Notifications
You must be signed in to change notification settings - Fork 398
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
nix: set TEST_GIT_EXECUTABLE_PATH
in devShell
#5463
Conversation
This environment variable is required for running tests on NixOS for me, otherwise the subprocess tests fail.
It doesn’t seem like |
I'm using nix-direnv, and |
FYI, the tests currently work for me on |
Hmm that's strange. I'm not sure why I'm seeing something different. I'm also on x86_64 Linux, and I checked out that same commit, and I ran that same command, and my .envrc is identical, but I'm getting different behavior. What does
I'm using |
My
So I think this fix is ultimately correct and should be merged. Let me guess: NixOS user? |
But why is it defaulting to |
Yep :)
I'm thinking that when |
Oh, do the tests unset |
Yes, I think it's unset to ensure consistency while running tests (except on Windows it's sometimes still set due to something with MinGW). I think the reason it hasn't been inconvenient is because when I tested setting Maybe we shouldn't be clearing |
As @scott2000 mentioned on Discord, this might be reasonable for setting a default search path on Linux: https://github.com/torvalds/linux/blob/405057718a1f9074133979a9f2ff0c9fa4a19948/arch/um/os-Linux/execvp.c#L54 FYI: git-branchless makes everyone set environment variables to run tests in any environment: https://github.com/arxanas/git-branchless/wiki/Runbook#running-tests-locally. Granted, it's more important because it integrates with Git more tightly and is more sensitive to version changes. Also FYI: be aware that Git has its own |
I think either we leave the inherited |
I didn't find anything obvious in the git-branchless commit history which strongly supports that we ought to clear out the
This doesn't specifically support any argument, but for future reference, here's the sanitized And the full sanitized environment: |
Just to add some context here:
|
Opa, that's a doozy. I think we can just set |
Closing this PR as it is superseded by #5468. |
@scott2000 sorry if I caused any churn here (such as for |
No worries! The discussion in that issue was actually really helpful since I couldn't find any good info online about whether |
This environment variable is required for running tests on NixOS for me, otherwise the subprocess tests fail.
Checklist
If applicable:
CHANGELOG.md