Document the interactive seam in AGENTS.md
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/integration Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful

This commit is contained in:
2026-09-22 22:58:52 +10:00
parent 4ff55f052a
commit 5a7fea56e2
+3 -1
View File
@@ -44,7 +44,9 @@ dist/ # build output: binaries, RPM, checksums (not comm
- **`run(args, stdout, stderr) int`** is the testable entry point; `main()` only
wires it to the real streams and `os.Exit`. Cobra runs with `SilenceUsage` and
`SilenceErrors` so nothing reaches stderr unless the run failed.
`SilenceErrors` so nothing reaches stderr unless the run failed. `run` derives
interactivity from `isTerminal(stdout)` and hands it to `runWith`, which tests
call directly to pin either side.
- **Flat CLI**: the root command takes `common_name` positionally
(`cobra.MaximumNArgs(1)`); no args prints help only when stdout is a terminal
and otherwise fails, args-less flags fail. `ca`, `completion` and `help` are