mirror of
https://github.com/floci-io/floci-cli.git
synced 2026-11-22 21:50:47 -05:00
fix(cli): end every error message with what to do next (#58)
* fix(cli): end every error message with what to do next Docker, snapshot, update and config profile errors now say how to recover (check Docker, run doctor or status, fix or delete the profile file, pass the missing profile name) instead of stopping at the failure. A test keeps new error messages to the convention. Signed-off-by: Hector Ventura <hectorvent@gmail.com> * fix(cli): keep the next step after docker's own output and name the instance in snapshot hints Docker's error output ends in a newline and can span lines, which read as 'already has a next step' and hid the hint. The exception now knows whether its text is docker's output or the CLI's own advice. Snapshot hints select the same instance again. Signed-off-by: Hector Ventura <hectorvent@gmail.com> --------- Signed-off-by: Hector Ventura <hectorvent@gmail.com>
This commit is contained in:
1 parent
6a74d7d2d5
commit
bd4fa0f134
18 files changed
+252
-31
No files matched your search
@@ -152,10 +152,9 @@ public class ResetCommand implements Callable<Integer> {
|
||||
printer.error("Resetting state is not available on this " + profile.displayName() + " server version.\n"
|
||||
+ "Restart it without --persist for a clean state, or track progress: " + profile.serverRepo() + "/issues");
|
||||
} else {
|
||||
String message = "Failed to reset " + profile.displayName() + ": " + e.getMessage();
|
||||
// Connection errors already say what to do; others get the status hint.
|
||||
printer.error(message.contains("\n") ? message
|
||||
: message + "\nRun '" + profile.commandPrefix() + " status" + global.instanceSelector() + "' to check the emulator.");
|
||||
printer.error("Failed to reset " + profile.displayName() + ": " + e.getMessage(),
|
||||
"Run '" + profile.commandPrefix() + " status" + global.instanceSelector() + "' to check the emulator.");
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user