Fix issue with cache cleaning

This commit is contained in:
Ivan Kravets
2016-09-14 22:50:14 +03:00
parent 27df09533c
commit 72084a2013
2 changed files with 5 additions and 5 deletions

View File

@ -14,7 +14,7 @@
import sys
VERSION = (3, 1, "0a1")
VERSION = (3, 1, "0a2")
__version__ = ".".join([str(s) for s in VERSION])
__title__ = "platformio"

View File

@ -43,9 +43,8 @@ def in_silence(ctx=None):
def clean_cache(ctx):
if ctx.args and (ctx.args[0] == "upgrade" or "update" in ctx.args):
with app.LocalCache() as lc:
lc.clean()
with app.LocalCache() as lc:
lc.clean()
def on_platformio_start(ctx, force, caller):
@ -58,9 +57,10 @@ def on_platformio_start(ctx, force, caller):
app.set_session_var("command_ctx", ctx)
app.set_session_var("force_option", force)
app.set_session_var("caller_id", caller)
clean_cache(ctx)
telemetry.on_command()
if ctx.args and (ctx.args[0] == "upgrade" or "update" in ctx.args):
clean_cache()
if not in_silence(ctx):
after_upgrade(ctx)