mirror of https://github.com/pypa/pip
Use truthiness of everything but None for use_user_site
This commit is contained in:
parent
17e9f4c4a3
commit
1310fc276a
|
@ -617,12 +617,12 @@ def decide_user_install(
|
|||
which is provided by the other arguments.
|
||||
"""
|
||||
# In some cases (config from tox), use_user_site can be set to an integer
|
||||
# rather than a bool. Comparing == True/False instead of 'is' allows this.
|
||||
if use_user_site == False: # noqa: E712
|
||||
# rather than a bool, which 'use_user_site is False' wouldn't catch.
|
||||
if (use_user_site is not None) and (not use_user_site):
|
||||
logger.debug("Non-user install by explicit request")
|
||||
return False
|
||||
|
||||
if use_user_site == True: # noqa: E712
|
||||
if use_user_site:
|
||||
if prefix_path:
|
||||
raise CommandError(
|
||||
"Can not combine '--user' and '--prefix' as they imply "
|
||||
|
|
Loading…
Reference in New Issue