Skip to content

Commit

Permalink
Merge pull request #5233 from pradyunsg/fix/5219
Browse files Browse the repository at this point in the history
Make the Windows "self-modification" check more strict
  • Loading branch information
pfmoore authored Apr 17, 2018
2 parents 5ea5c4d + 2a085b3 commit ea1319d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions news/5219.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug that made get-pip.py unusable on Windows without renaming.
4 changes: 2 additions & 2 deletions src/pip/_internal/basecommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,8 @@ def populate_requirement_set(requirement_set, args, options, finder,
# See https://github.com/pypa/pip/issues/1299 for more discussion
should_show_use_python_msg = (
WINDOWS and
requirement_set.has_requirement('pip') and
"pip" in os.path.basename(sys.argv[0])
requirement_set.has_requirement("pip") and
os.path.basename(sys.argv[0]).startswith("pip")
)
if should_show_use_python_msg:
new_command = [
Expand Down

0 comments on commit ea1319d

Please sign in to comment.