Thanks to visit codestin.com
Credit goes to github.com

Skip to content

correctly handle uname-cmd that doesn't point to an executable file #2026

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

gcmarx
Copy link

@gcmarx gcmarx commented May 22, 2025

I also ran into the issue from #1979. My proposed solution is that GitPython should only try to run uname_cmd if it points to an executable file. I also wrote a short test class for the is_cygwin_git function. I don't have a machine with Cygwin, so I can't test that it actually does work, but I trust the Python docs when they say that on Cygwin, sys.platform will be cygwin.

@gcmarx
Copy link
Author

gcmarx commented May 22, 2025

honestly, after having written this code, I'm not sure why we're not just delegating is_cygwin_git to sys.platform == "cygwin".

@gcmarx
Copy link
Author

gcmarx commented May 22, 2025

see #2027 for a different implementation of the same basic logic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant