Enhance user privacy protection through refined telemetry implementation

This commit is contained in:
Ivan Kravets
2023-06-05 18:24:42 +03:00
parent 6ea7ded483
commit cb65bdf22f
9 changed files with 257 additions and 325 deletions
+15
View File
@@ -63,6 +63,21 @@ class PlatformioCLI(click.MultiCommand):
]
)
@classmethod
def reveal_cmd_path_args(cls, ctx):
result = []
group = ctx.command
args = cls.leftover_args[::]
while args:
cmd_name = args.pop(0)
next_group = group.get_command(ctx, cmd_name)
if next_group:
group = next_group
result.append(cmd_name)
if not hasattr(group, "get_command"):
break
return result
def invoke(self, ctx):
PlatformioCLI.leftover_args = ctx.args
if hasattr(ctx, "protected_args"):