-
Notifications
You must be signed in to change notification settings - Fork 2
Use addenv
to ensure git commands don't leak env variables
#45
Conversation
Want to add a Then, in the not-so-distant future, we can make a breaking release of GitCommand in which we have removed those functions. |
The fact is that the way you call the function is completely different, not sure how to write a reasonable deprecation warning |
Ah fair enough, yeah let's omit the depwarn then. |
Honestly the new interface looks much easier to use! |
Ok, well, tests are passing also on Windows. I guess it's good, but then I don't understand what's going on in JuliaEcosystem/PackageAnalyzer.jl#39. Marking this as ready for review |
Codecov Report
@@ Coverage Diff @@
## master #45 +/- ##
==========================================
- Coverage 94.64% 94.33% -0.31%
==========================================
Files 4 4
Lines 56 53 -3
==========================================
- Hits 53 50 -3
Misses 3 3
Continue to review full report at Codecov.
|
What's the Windows issue you're having? IIRC on Windows we just distribute the official Git for Windows binaries. So on Windows I don't think we do any modification of the environment, or the library search path, or anything like that. |
LGTM. I can't believe that before this PR I was doing things like |
The environment variables seem to be leaked: https://github.com/giordano/AnalyzeRegistry.jl/pull/39/checks?check_run_id=2161991335#step:6:134. But tests here don't confirm it |
Maybe something is going wrong inside Git_jll? IIRC on Windows we get the environment variables mappings straight from Git_jll: Line 4 in 64d6cff
|
But also, on Windows, we read some stuff from the existing |
Reading isn't 100% thread-safe if something else is changing the global variables, but the important thing is that we don't change the global state, which is what I'm ensuring with the added tests. And we read Line 31 in 64d6cff
|
No description provided.