Skip to content

Commit 8289064

Browse files
committed
Show error if list option used with other args
Signed-off-by: Alireza Poodineh <[email protected]>
1 parent 164b1c0 commit 8289064

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/pybite/handlers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ def handle_bite_run(host: Host, args: argparse.Namespace, extras: List[str]) ->
2525
"""
2626
list_targets = getattr(args, 'list', False)
2727
if list_targets:
28+
if getattr(args, 'target', 'help') != 'help' or extras:
29+
host.get_argparser().error("The 'list' option cannot be used with other arguments.")
30+
2831
dependant_targets: List[MSBuildTarget] = []
2932
targets = host._get_bite_core_targets()
3033
print("Available independent targets:")

0 commit comments

Comments
 (0)