Commit 15fc822
committed
fix(manifest): include lazily-registered --help and --version flags
Cobra registers the default help and version flags during Execute, so a
command-tree walk performed before then omitted them. `vulnetix --version`
was therefore absent from docs/command-manifest.json, and the documentation
sites that validate their snippets against the manifest could not verify the
flag the install guides tell users to run.
Call InitDefaultHelpFlag/InitDefaultVersionFlag before walking, and document
the real global flag set (--verbose, --silent, --no-progress, --no-banner,
--no-analytics, --disable-memory, --version) in the CLI reference, with an
explicit note that --verbose is a diagnostic toggle and not a log level: the
CLI has no --debug flag and reads no DEBUG environment variable.1 parent 1d06781 commit 15fc822
3 files changed
Lines changed: 25 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
52 | 57 | | |
53 | 58 | | |
54 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4814 | 4814 | | |
4815 | 4815 | | |
4816 | 4816 | | |
| 4817 | + | |
4817 | 4818 | | |
4818 | 4819 | | |
4819 | 4820 | | |
4820 | 4821 | | |
4821 | 4822 | | |
4822 | | - | |
| 4823 | + | |
| 4824 | + | |
4823 | 4825 | | |
4824 | 4826 | | |
4825 | 4827 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
899 | 899 | | |
900 | 900 | | |
901 | 901 | | |
902 | | - | |
903 | | - | |
904 | | - | |
905 | | - | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
906 | 919 | | |
907 | 920 | | |
908 | 921 | | |
| |||
0 commit comments