mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Fix issue with cache cleaning
This commit is contained in:
@ -14,7 +14,7 @@
|
||||
|
||||
import sys
|
||||
|
||||
VERSION = (3, 1, "0a1")
|
||||
VERSION = (3, 1, "0a2")
|
||||
__version__ = ".".join([str(s) for s in VERSION])
|
||||
|
||||
__title__ = "platformio"
|
||||
|
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user