Skip to content

Commit

Permalink
pw_system: Don't glob protos when starting console
Browse files Browse the repository at this point in the history
By default if no protos are passed to the pw_system console, it
recursively globs every proto in the directory the tool is run from.
This is a little too ambitious, and can pick up many protos that are
unintended for use with pw_system. This changes the default to instead
not pick up any additional protos.

Change-Id: If69c48ee394c2929df49ef81b81d54b25bf96e62
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/100782
Commit-Queue: Auto-Submit <[email protected]>
Pigweed-Auto-Submit: Armando Montanez <[email protected]>
Reviewed-by: Carlos Chinchilla <[email protected]>
  • Loading branch information
armandomontanez authored and CQ Bot Account committed Jul 1, 2022
1 parent ba4803a commit 005fcb3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pw_system/py/pw_system/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def _parse_args():
help='Path to a pw_console yaml config file.')
parser.add_argument('--proto-globs',
nargs='+',
default=[],
help='glob pattern for .proto files')
parser.add_argument('-v',
'--verbose',
Expand Down Expand Up @@ -264,9 +265,6 @@ def console(device: str,
detokenizer = AutoUpdatingDetokenizer(*token_databases)
detokenizer.show_errors = True

if not proto_globs:
proto_globs = ['**/*.proto']

protos: List[Union[ModuleType, Path]] = list(_expand_globs(proto_globs))

if compiled_protos is None:
Expand Down

0 comments on commit 005fcb3

Please sign in to comment.