-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
Shutil.which
incosistent with windows's where
#84772
Comments
Shutil's which implementation does not work correctly when someone set's empty item in set PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;.RBW; I'm not 100% sure how I got this in my PATHEXT config, I wasn't changing that so maybe some bugged uninstaller not removed it's extension correctly. This makes things confusing as Windows will find correctly binary, but Python will return nothing, due to this part:
pathext is initialized as Because any string ends with empty string (''), files list will have plain version added like Workaround is to use full name Filtering out empty strings would fix that. |
Sounds like a good opportunity for someone to make their first contribution. Post a message if you'd like to work on this (and a test), and we can help get through the PR process. |
@steve.dower I would really love to work on this and make my first contribution. Never did one, so I would some help doing this one :) |
@steve.dower Added the changes in the PR - could you please re-check? Thank you! |
@steve.dower Your advice did it, is fixed and green! :) Thank you again |
Thanks for the contribution! Looking forward to your next one :) |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: