From 3514a291f3ab1e74c176e5b33b057dde6fb710b3 Mon Sep 17 00:00:00 2001 From: Naoto Ono Date: Mon, 27 Jan 2025 08:24:12 +0900 Subject: [PATCH] subset: fix validation condition --- launchable/commands/subset.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/launchable/commands/subset.py b/launchable/commands/subset.py index ffb7d7c56..547f16843 100644 --- a/launchable/commands/subset.py +++ b/launchable/commands/subset.py @@ -218,8 +218,12 @@ def subset( app = context.obj tracking_client = TrackingClient(Tracking.Command.SUBSET, app=app) - if is_observation and is_get_tests_from_previous_sessions: - msg = "Cannot use --observation and --get-tests-from-previous-sessions options at the same time" + if is_observation and is_get_tests_from_previous_sessions and not is_output_exclusion_rules: + msg = """ +ERROR: Invalid command combination detected. +The use of --observation and --get-tests-from-previous-sessions without specifying --output-exclusion-rules is not allowed. +You may only use --observation by itself, or combine --get-tests-from-previous-sessions with --output-exclusion-rules. +""" click.echo( click.style( msg,