Files
bot-bottle/claude_bottle/cli/build.py
T
didericis 4ebfcec2f7
test / run tests/run_tests.py (push) Successful in 15s
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 <noreply@anthropic.com>
2026-05-10 00:16:17 -04:00

20 lines
507 B
Python

"""build: build (or rebuild) the claude-bottle Docker image."""
from __future__ import annotations
import argparse
import os
from .. import docker as docker_mod
from ._common import PROG, REPO_DIR
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)
return 0