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
@@ -54,7 +54,7 @@ public class LogsCommand implements Callable<Integer> {
|
||||
return 1;
|
||||
}
|
||||
} catch (DockerException e) {
|
||||
printer.error("Failed to inspect container: " + e.getMessage());
|
||||
printer.error("Failed to inspect container: " + e.withNextStep(DockerClient.CHECK_DOCKER));
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class LogsCommand implements Callable<Integer> {
|
||||
docker.streamLogs(global.container, follow, tail, since);
|
||||
return 0;
|
||||
} catch (DockerException e) {
|
||||
printer.error("Failed to fetch logs: " + e.getMessage());
|
||||
printer.error("Failed to fetch logs: " + e.withNextStep(DockerClient.CHECK_DOCKER));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user