-
-
Notifications
You must be signed in to change notification settings - Fork 189
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
BUG: failed git detection (despite it being on PATH) on windows #2185
Comments
With
CC @mgorny |
Interestingly, I get this error now even after rolling back to conda-smithy 3.44.9 (conda hung on rollback, so I tried recreating the environment). So it might not be related to #2120 after all. In any case, my workflow is completely broken now - cannot get thing to work despite Here's are the recent environment changes
No idea why mamba got downgraded, but that's a sideshow. I also ran
Always fun when even the roll-back attempts all fail 😑 |
Hmm, |
That's what I did in
But perhaps the removal wasn't clean for some reason... |
So conda-smithy has dependend on |
Hmm, but unless I'm mistaken, the newest version should not require |
If I do that:
|
OK, I had done that in my debug environment which still has 3.44.9; if I do it in an up-to-date environment (with 3.45.0 but without traceback
|
Now, that looks like a valid bug. I'll take a look at it later today. |
For a quick test, could you see if the following patch helps with this immediate error: diff --git a/conda_smithy/feedstock_io.py b/conda_smithy/feedstock_io.py
index 900fbdc0..281d3c4f 100644
--- a/conda_smithy/feedstock_io.py
+++ b/conda_smithy/feedstock_io.py
@@ -65,7 +65,7 @@ def write_file(filename):
repo = get_repo(filename)
if repo:
- repo.index.add(os.path.relpath(filename, repo.workdir))
+ repo.index.add(os.path.relpath(filename, repo.workdir).replace(os.path.sep, '/'))
repo.index.write()
My guess is that git expects unix paths. If you confirm, I'll look into preparing a better fix. I'm very sorry about the issue. |
I did that (plus two more lines where it was necessary; 41 & 126), and it now fails with:
All good, it happens. It's just very strange how things interact between the different git libraries... |
Is |
I pointed out in the OP that it's available in the terminal where I use both @echo off
setlocal
@chcp 65001 > nul
@SET "Path=C:\Users\[xxx]\.pixi\envs\git;C:\Users\[xxx]\.pixi\envs\git\Library/mingw-w64/bin;C:\Users\[xxx]\.pixi\envs\git\Library/usr/bin;C:\Users\[xxx]\.pixi\envs\git\Library/bin;C:\Users\[xxx]\.pixi\envs\git\Scripts;C:\Users\[xxx]\.pixi\envs\git\bin;%Path%"
@SET "CONDA_PREFIX=C:\Users\[xxx]\.pixi\envs\git"
@"C:\Users\[xxx]\.pixi\envs\git\Library/bin/git.exe" %*
endlocal Before I got around to checking whether the path of the actual exe was in my path, I just re-updated my
With this unexplained change, I was now also able to reinstall So it looks conceivable that something somewhere somehow corrupted my git install (making it invisible from subprocess, but still visible from my own terminal). CC @wolfv for awareness |
Ah, actually the fix above is still necessary |
libgit2 expects internal git paths to be passed in git convention, that is using forward slashes. Use pathlib.Path.as_posix() to ensure that the correct conversion is used when passing paths to index operations. Fixes conda-forge#2185
libgit2 expects internal git paths to be passed in git convention, that is using forward slashes. Use pathlib.Path.as_posix() to ensure that the correct conversion is used when passing paths to index operations. Fixes conda-forge#2185
libgit2 expects internal git paths to be passed in git convention, that is using forward slashes. Use pathlib.Path.as_posix() to ensure that the correct conversion is used when passing paths to index operations. Fixes conda-forge#2185
With 3.45.0, I get
It's definitely on my path though
The text was updated successfully, but these errors were encountered: