[New-bugs-announce] [issue44270] shutil.which: does not find path/cmd.ext where ext is not given
Michael Hirsch, Ph.D.
report at bugs.python.org
Sun May 30 22:15:53 EDT 2021
New submission from Michael Hirsch, Ph.D. <michael at scivision.dev>:
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.
components: Library (Lib)
title: shutil.which: does not find path/cmd.ext where ext is not given
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce