From ceacbd1d8d3804f646769cf879ef0ca25d7a7ac0 Mon Sep 17 00:00:00 2001 From: aitbc Date: Fri, 8 May 2026 10:49:14 +0200 Subject: [PATCH] Delegate Click commands via subprocess instead of direct import - Changed Click command delegation from importing aitbc_click() to subprocess call - Runs click_cli.py as separate process using sys.executable - Passes through command line arguments via sys.argv[1:] - Returns subprocess exit code to caller --- cli/aitbc_cli.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cli/aitbc_cli.py b/cli/aitbc_cli.py index 8555bb67..dbb880e6 100755 --- a/cli/aitbc_cli.py +++ b/cli/aitbc_cli.py @@ -3194,9 +3194,11 @@ def main(argv=None): # Check if this is a Click command if argv and argv[0] in CLICK_COMMANDS: - # Delegate to Click CLI - from cli.click_cli import aitbc_click - aitbc_click() + # Delegate to Click CLI by calling click_cli.py as a module + import subprocess + click_cli_path = Path("/opt/aitbc/cli/click_cli.py") + result = subprocess.run([sys.executable, str(click_cli_path)] + sys.argv[1:]) + return result.returncode elif len(argv) > 0 and argv[0] == "genesis": # Run genesis CLI subprocess genesis_path = Path(__file__).parent.parent / "genesis" / "genesis_cli.py"