mirror of https://github.com/pypa/pip
Check for new pip version after run call
If a pip install --update was performed, the version check should not find anything. Closes #2829
This commit is contained in:
parent
a767bac95b
commit
7cd1586d27
|
@ -210,15 +210,6 @@ class Command(object):
|
|||
)
|
||||
sys.exit(VIRTUALENV_NOT_FOUND)
|
||||
|
||||
# Check if we're using the latest version of pip available
|
||||
if (not options.disable_pip_version_check and not
|
||||
getattr(options, "no_index", False)):
|
||||
with self._build_session(
|
||||
options,
|
||||
retries=0,
|
||||
timeout=min(5, options.timeout)) as session:
|
||||
pip_version_check(session)
|
||||
|
||||
try:
|
||||
status = self.run(options, args)
|
||||
# FIXME: all commands should return an exit status
|
||||
|
@ -249,6 +240,15 @@ class Command(object):
|
|||
logger.critical('Exception:\n%s', format_exc())
|
||||
|
||||
return UNKNOWN_ERROR
|
||||
finally:
|
||||
# Check if we're using the latest version of pip available
|
||||
if (not options.disable_pip_version_check and not
|
||||
getattr(options, "no_index", False)):
|
||||
with self._build_session(
|
||||
options,
|
||||
retries=0,
|
||||
timeout=min(5, options.timeout)) as session:
|
||||
pip_version_check(session)
|
||||
|
||||
return SUCCESS
|
||||
|
||||
|
|
Loading…
Reference in New Issue