From 5ca3270a6797e49ef1da83d7665729e6f5953b40 Mon Sep 17 00:00:00 2001 From: actionless Date: Fri, 12 Apr 2024 01:44:05 +0200 Subject: [PATCH] fix(args: get_parser_for_action): help could be both action and action-modifier so handle it slightly differently --- pikaur/args.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pikaur/args.py b/pikaur/args.py index ef773596c..cd445f1b8 100644 --- a/pikaur/args.py +++ b/pikaur/args.py @@ -660,9 +660,9 @@ def get_parser_for_action( parsed_action = parser.parse_pikaur_args(args) pikaur_action: str | None = None for action_name in ALL_ACTIONS: - if getattr(parsed_action, action_name): + if getattr(parsed_action, action_name) and action_name != "help": pikaur_action = action_name - if pikaur_action in {"help", None}: + if (pikaur_action is None): return parser, [] help_msgs: list[HelpMessage] = []