You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
shutil.which: does not find path/cmd.ext where ext is not given #88436
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2021-05-31.02:51:06.833>created_at=<Date2021-05-31.02:15:53.119>labels= ['type-bug', 'library', '3.9', '3.10', '3.11']
title='shutil.which: does not find path/cmd.ext where ext is not given'updated_at=<Date2021-05-31.02:51:06.829>user='https://github.com/scivision'
The early short-circuit logic in shutil.which() when cmd includes a directory component incorrectly gives None on Windows if the correct filename suffix was not also given.
Example: on Windows if ./foo.exe exists, then shutil.which('./foo.exe') returns None.
Activity
scivision commentedon May 31, 2021
The early short-circuit logic in shutil.which() when cmd includes a directory component incorrectly gives None on Windows if the correct filename suffix was not also given.
Example: on Windows if ./foo.exe exists, then shutil.which('./foo.exe') returns None.
scivision commentedon May 31, 2021
Correction:
Example: on Windows if ./foo.exe exists, then shutil.which('./foo') returns None.
eryksun commentedon May 31, 2021
Michael, thank you for the PR, but please associate it with the existing issue bpo-24505.