mirror of
https://github.com/floci-io/floci-cli.git
synced 2026-11-22 21:50:47 -05:00
fix(cli): exit 2 for every rejected value, not 1 in some commands
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>
This commit is contained in:
15 files changed
+105
-32
No files matched your search
@@ -120,8 +120,9 @@ public class AzSetupCommand implements Callable<Integer> {
|
||||
try {
|
||||
flociAzDir = InstanceState.dir(stateRoot, ProductProfile.AZ, cloud);
|
||||
} catch (IllegalArgumentException e) {
|
||||
// A container name that cannot be used: the same exit code as any other bad argument.
|
||||
printer.error(e.getMessage());
|
||||
return 1;
|
||||
return ExitCode.USAGE;
|
||||
}
|
||||
try {
|
||||
return reset ? reset(printer, flociAzDir, cloud) : setup(printer, flociAzDir, cloud);
|
||||
|
||||
Reference in new issue
Block a user