feat(cli): real doctor subcommand with adb/emulator/java checks

Each check is a value so tests can swap in fakes. Java check parses
both legacy (1.8) and modern (17+) version strings. Emulator check
falls back to ANDROID_HOME/emulator/emulator since the brew cask
ships it without putting it on PATH.
This commit is contained in:
pj committed 2026-04-17 23:56:00 +07:00
1 parent 63796fbd42
commit b6b18c3681
4 files changed
+210 -7

No files matched your search

+2 -2
View File
@@ -1,6 +1,7 @@
package main
import (
"context"
"errors"
"flag"
"fmt"
@@ -66,8 +67,7 @@ func runTest(options testOptions, stdout io.Writer) error {
}
func runDoctor(stdout io.Writer) error {
fmt.Fprintln(stdout, "uatu doctor (stub): all checks pending implementation")
return nil
return runDoctorChecks(context.Background(), defaultDoctorChecks(), stdout)
}
func run(args []string, stdout, stderr io.Writer) error {