From 4ebfcec2f7eb0f07681011f44cd841ae7f72cb2a Mon Sep 17 00:00:00 2001 From: didericis Date: Sun, 10 May 2026 00:16:17 -0400 Subject: [PATCH] fix(cli): make 'build --help' actually print help cmd_build was ignoring its argv, so 'cli.py build --help' fell through and started a docker build instead of printing the subcommand's argparse help. Wire up an empty parser so --help and unknown args are handled the same way the other subcommands handle them. Co-Authored-By: Claude Opus 4.7 --- claude_bottle/cli/build.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/claude_bottle/cli/build.py b/claude_bottle/cli/build.py index 492ffd7..88fe716 100644 --- a/claude_bottle/cli/build.py +++ b/claude_bottle/cli/build.py @@ -2,13 +2,17 @@ from __future__ import annotations +import argparse import os from .. import docker as docker_mod -from ._common import REPO_DIR +from ._common import PROG, REPO_DIR -def cmd_build(_argv: list[str]) -> int: +def cmd_build(argv: list[str]) -> int: + parser = argparse.ArgumentParser(prog=f"{PROG} build", add_help=True) + parser.parse_args(argv) + docker_mod.require_docker() image = os.environ.get("CLAUDE_BOTTLE_IMAGE", "claude-bottle:latest") docker_mod.build_image(image, REPO_DIR)