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

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rewrite tests and support . in PATHEXT.
  • Loading branch information
serhiy-storchaka committed Nov 22, 2024
commit 851c4c2bdc88d79effd7ffbb019ef5e5a60b4166
2 changes: 1 addition & 1 deletion Lib/shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -1550,7 +1550,7 @@ def which(cmd, mode=os.F_OK | os.X_OK, path=None):
if sys.platform == "win32":
# PATHEXT is necessary to check on Windows.
pathext_source = os.getenv("PATHEXT") or _WIN_DEFAULT_PATHEXT
pathext = [ext for ext in pathext_source.split(os.pathsep) if ext]
pathext = [ext.rstrip('.') for ext in pathext_source.split(os.pathsep) if ext]

if use_bytes:
pathext = [os.fsencode(ext) for ext in pathext]
Expand Down
Loading