Skip to content

Commit 988d97b

Browse files
committed
Fix typo in _get_exe_extensions PATHEXT fallback
PATHEXT lists file extensions with the ".". In the fallback given in _get_exe_extensions, the other extensions had this, but ".COM" was listed without the ".". This fixes that. This is very minor because _get_exe_extensions is nonpublic and not currently used on native Windows, which is the platform where the PATHEXT fallback code would be used. Specifically, _get_exe_extensions is called only in py_where, which while named with no leading underscore is nonpublic do not being (and never having been) listed in __all__. As its docstring states, it is an implementation detail of is_cygwin_git and not intended for any other use. More specifically, is_cygwin_git currently immediately returns False on *native* Windows (even if the git executable GitPython is using is a Cygwin git executable). Only on Cygwin, or other systems that are not native Windows, does it try to check the git executable (by calling its _is_cygwin_git helper, which uses py_where).
1 parent 83bed19 commit 988d97b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ def _get_exe_extensions() -> Sequence[str]:
339339
if PATHEXT:
340340
return tuple(p.upper() for p in PATHEXT.split(os.pathsep))
341341
elif sys.platform == "win32":
342-
return (".BAT", "COM", ".EXE")
342+
return (".BAT", ".COM", ".EXE")
343343
else:
344344
return ()
345345

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy