Skip to content

Remove trailing os.sep to avoid false negatives #5293

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

Merged
merged 2 commits into from
Apr 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions news/5293.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove trailing os.sep from PATH directories to avoid false negatives
3 changes: 2 additions & 1 deletion src/pip/_internal/wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ def message_about_scripts_not_on_PATH(scripts):

# We don't want to warn for directories that are on PATH.
not_warn_dirs = [
os.path.normcase(i) for i in os.environ["PATH"].split(os.pathsep)
os.path.normcase(i).rstrip(os.sep) for i in
os.environ["PATH"].split(os.pathsep)
]
# If an executable sits with sys.executable, we don't warn for it.
# This covers the case of venv invocations without activating the venv.
Expand Down