Skip to content

Commit

Permalink
Avoid pip cache when problem occurs for upgrade process // Issue #295
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Oct 2, 2015
1 parent e22ab78 commit 3c36eaf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions platformio/commands/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion scripts/get-platformio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3c36eaf

Please sign in to comment.