mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
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)
|
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:
|
try:
|
||||||
status = self.run(options, args)
|
status = self.run(options, args)
|
||||||
# FIXME: all commands should return an exit status
|
# FIXME: all commands should return an exit status
|
||||||
|
@ -249,6 +240,15 @@ class Command(object):
|
||||||
logger.critical('Exception:\n%s', format_exc())
|
logger.critical('Exception:\n%s', format_exc())
|
||||||
|
|
||||||
return UNKNOWN_ERROR
|
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
|
return SUCCESS
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue