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 (#66)
* 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> * test(restart): pin exit 2 for an unusable persist path before anything is stopped Signed-off-by: Hector Ventura <hectorvent@gmail.com> --------- Signed-off-by: Hector Ventura <hectorvent@gmail.com>
This commit is contained in:
1 parent
188aa23edc
commit
c65987abba
16 files changed
+175
-32
No files matched your search
@@ -74,6 +74,11 @@ public class RestartCommand implements Callable<Integer> {
|
||||
printer.error(invalid);
|
||||
return 2;
|
||||
}
|
||||
String rejected = start.persistPathError();
|
||||
if (rejected != null) {
|
||||
printer.error(rejected);
|
||||
return ExitCode.USAGE;
|
||||
}
|
||||
String unwritable = start.preparePersistDir();
|
||||
if (unwritable != null) {
|
||||
printer.error(unwritable);
|
||||
|
||||
Reference in new issue
Block a user