forked from platformio/platformio-core
Move "in_silence" to PlatformioCLI
This commit is contained in:
1 parent
a30b79c5fc
commit
4386dc56ea
5 files changed
+14
-14
No files matched your search
@@ -22,6 +22,14 @@ class PlatformioCLI(click.MultiCommand):
|
||||
|
||||
leftover_args = []
|
||||
|
||||
@staticmethod
|
||||
def in_silence():
|
||||
args = PlatformioCLI.leftover_args
|
||||
return args and any([
|
||||
args[0] == "debug" and "--interpreter" in " ".join(args),
|
||||
args[0] == "upgrade", "--json-output" in args, "--version" in args
|
||||
])
|
||||
|
||||
def invoke(self, ctx):
|
||||
PlatformioCLI.leftover_args = ctx.args
|
||||
if hasattr(ctx, "protected_args"):
|
||||
|
||||
@@ -80,7 +80,7 @@ def cli(ctx, **options):
|
||||
ctx.invoked_subcommand)
|
||||
|
||||
ctx.obj = LibraryManager(storage_dir)
|
||||
if "--json-output" not in PlatformioCLI.leftover_args:
|
||||
if not PlatformioCLI.in_silence():
|
||||
click.echo("Library Storage: " + storage_dir)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user