From 9b9a7f72ee9b93a8aedb51ac6629213ef6806386 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Tue, 9 Sep 2025 21:23:59 +0100 Subject: [PATCH] Fix special case for help_with_error. Fixes #162 --- src/manage/commands.py | 2 ++ src/pymanager/main.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/manage/commands.py b/src/manage/commands.py index 74b773b..7c2ca25 100644 --- a/src/manage/commands.py +++ b/src/manage/commands.py @@ -919,6 +919,8 @@ class HelpWithErrorCommand(HelpCommand): def __init__(self, args, root=None): # Essentially disable argument processing for this command super().__init__(args[:1], root) + # First argument was "**help_with_error", so ignore it. + # Subsequent arguments should be what was originally passed self.args = args[1:] def execute(self): diff --git a/src/pymanager/main.cpp b/src/pymanager/main.cpp index 8df8ce6..95512bc 100644 --- a/src/pymanager/main.cpp +++ b/src/pymanager/main.cpp @@ -578,7 +578,7 @@ wmain(int argc, wchar_t **argv) // Use the default command if we have one if (default_cmd) { - if (!wcscmp(default_cmd, L"__help_with_error")) { + if (!wcscmp(default_cmd, L"**help_with_error")) { const wchar_t *new_argv[] = {argv[0], default_cmd, argv[1]}; return run_command(3, new_argv); }