forked from platformio/platformio-core
Fix issue with cache cleaning
This commit is contained in:
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
VERSION = (3, 1, "0a1")
|
VERSION = (3, 1, "0a2")
|
||||||
__version__ = ".".join([str(s) for s in VERSION])
|
__version__ = ".".join([str(s) for s in VERSION])
|
||||||
|
|
||||||
__title__ = "platformio"
|
__title__ = "platformio"
|
||||||
|
@ -43,9 +43,8 @@ def in_silence(ctx=None):
|
|||||||
|
|
||||||
|
|
||||||
def clean_cache(ctx):
|
def clean_cache(ctx):
|
||||||
if ctx.args and (ctx.args[0] == "upgrade" or "update" in ctx.args):
|
with app.LocalCache() as lc:
|
||||||
with app.LocalCache() as lc:
|
lc.clean()
|
||||||
lc.clean()
|
|
||||||
|
|
||||||
|
|
||||||
def on_platformio_start(ctx, force, caller):
|
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("command_ctx", ctx)
|
||||||
app.set_session_var("force_option", force)
|
app.set_session_var("force_option", force)
|
||||||
app.set_session_var("caller_id", caller)
|
app.set_session_var("caller_id", caller)
|
||||||
clean_cache(ctx)
|
|
||||||
telemetry.on_command()
|
telemetry.on_command()
|
||||||
|
|
||||||
|
if ctx.args and (ctx.args[0] == "upgrade" or "update" in ctx.args):
|
||||||
|
clean_cache()
|
||||||
if not in_silence(ctx):
|
if not in_silence(ctx):
|
||||||
after_upgrade(ctx)
|
after_upgrade(ctx)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user