config default-product, config profile (unknown action, missing name, --port out of range), update --version, an invalid snapshot name, an invalid az setup container name and an unusable --persist path returned 1, the code for a command that ran and failed. They now return 2 like every other rejected value. A persist directory that cannot be created is still 1.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* docs: add an exit-code table and generated --help snapshots
README gains the exit codes scripts can rely on, per command. docs/help holds the --help text of every command in every tree, and HelpSnapshotTest fails when the files and the commands drift apart.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* docs: say which rejected values exit 1 and pin the documented exit codes with a test
The table promised 2 for every unusable value, but three commands report a rejected value with 1. The wording is narrowed, the three are named, and ExitCodeTableTest pins the rows that need neither Docker nor a server.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* test: keep the exit-code test off the developer's saved profiles
The profile commands build their own store under the home directory, so the test now runs with a temporary home.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
---------
Signed-off-by: Hector Ventura <hectorvent@gmail.com>