Avoid pip cache when problem occurs for upgrade process // Issue #295

This commit is contained in:
Ivan Kravets
2015-10-02 16:14:04 +01:00
parent e22ab787dd
commit 3c36eafdfa
2 changed files with 6 additions and 1 deletions

View File

@ -32,6 +32,11 @@ def cli():
for cmd in cmds:
r = None
r = util.exec_command(cmd)
# try pip with disabled cache
if r['returncode'] != 0 and cmd[0] == "pip":
r = util.exec_command(["pip", "--no-cache-dir"] + cmd[1:])
assert r['returncode'] == 0
assert last in r['out'].strip()
click.secho(

View File

@ -97,7 +97,7 @@ def main():
("Fixing Windows %PATH% Environment", fix_winpython_pathenv, []),
("Installing Python Package Manager", install_pip, []),
("Installing PlatformIO and dependencies", install_pypi_packages,
[["setuptools", "virtualenv", "platformio"]])
[["setuptools", "platformio"]])
]
if not IS_WINDOWS: