From b77bbefba505747cb961287ab92a941fb0d37ad1 Mon Sep 17 00:00:00 2001 From: xuyucai Date: Tue, 17 Feb 2026 16:41:32 +0800 Subject: [PATCH] fix: correct operator precedence in install command validation Fixed issue #335: --pr cannot be used with --version or --commit The condition "pr and version not in {None, \"nightly\"} or commit" was evaluated incorrectly due to operator precedence. Added parentheses to ensure the logic only triggers error when --pr is actually combined with conflicting flags, not when only --commit is specified. Co-Authored-By: Claude --- comfy_cli/cmdline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy_cli/cmdline.py b/comfy_cli/cmdline.py index 3699ffe9..52847522 100644 --- a/comfy_cli/cmdline.py +++ b/comfy_cli/cmdline.py @@ -325,7 +325,7 @@ def install( ) raise typer.Exit(code=1) - if pr and version not in {None, "nightly"} or commit: + if pr and (version not in {None, "nightly"} or commit): rprint("--pr cannot be used with --version or --commit") raise typer.Exit(code=1)