Show container usage when missing subcommand #18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
title: Show container usage when missing subcommand
description: Invoking
./bin/docmachine containercurrently prints “No container command specified…” but omits the usage instructions and list of available subcommands, forcing the user to re-run with--help.current_situation:
DocMachine::Container::Cli#add_options(src/container/cli.cr:12-83) enqueues a command that raisesDocMachine::CliErrorwhen no subcommand arguments remain (line 79), but doesn’t print the container-specific usage banner or help text beforehand. Contrast this with main CLI--help, which shows the subcommand list. The container command should display the same instructions automatically when invoked without arguments, aligning with ADR-CLI expectations.expected_outcome:
./bin/docmachine containershould show the container usage banner and subcommand list before raising an error (or exit 0 with help message).technical_details:
opts.banner/opts.helpor manually print the string defined earlier inadd_optionswhen no subcommand is provided.DocMachine::HelpRequestedwith the container-specific usage text for consistency with the main CLI.c4d6e12 Show container usage when missing subcommandto Show container usage when missing subcommand