Skip to content

Commit ba441ca

Browse files
committed
fix: print doctor command results
1 parent db0ebd7 commit ba441ca

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

cli/src/main.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,18 @@ fn main() -> Result<()> {
340340
}
341341
Commands::Doctor => {
342342
let env = require_ontoenv(env)?;
343-
env.doctor();
343+
let problems = env.doctor()?;
344+
if problems.is_empty() {
345+
println!("No issues found.");
346+
} else {
347+
println!("Found {} issues:", problems.len());
348+
for problem in problems {
349+
println!("- {}", problem.message);
350+
for location in problem.locations {
351+
println!(" - {}", location);
352+
}
353+
}
354+
}
344355
}
345356
Commands::Reset { force } => {
346357
// remove .ontoenv directory

0 commit comments

Comments
 (0)