fix(doctor): fail -o json on a failed check and name each product in its hints (#52)

* fix(doctor): fail -o json on a failed check and name each product in its hints

doctor -o json now exits 1 when a check fails, as text output does; hints and HTTP errors name the product's own command (floci gcp start, ...) and the port check falls back to the product's default port; a warnings-only run no longer reads as '0 issue(s) found'; an https AWS_ENDPOINT_URL without a port means 443.

* fix(http): name the product's status command when a request times out

Both ways a request can time out now give the same message with the product's own command. The hint tests use their own local endpoints instead of port 9.
This commit is contained in:
Hector Ventura authored and GitHub committed 2026-10-10 18:45:05 -05:00
1 parent 4cd39a957a
commit 771b353733
20 files changed
+266 -35

No files matched your search

@@ -44,7 +44,7 @@ public class ServicesCommand implements Callable<Integer> {
// Resolve the endpoint from the container's port mapping, like status/wait/env do,
// so a container started with --port <n> is still found without --endpoint.
String effectiveEndpoint = global.resolvedEndpoint(new DockerClient());
FlociHttpClient client = new FlociHttpClient(effectiveEndpoint, profile.controlPrefix());
FlociHttpClient client = new FlociHttpClient(effectiveEndpoint, profile);
List<String> services;
try {