mirror of
https://github.com/Tencent/BrowserSkill.git
synced 2026-09-10 13:01:23 +08:00
fix(doctor): exit nonzero on failed checks
This commit is contained in:
@@ -56,9 +56,12 @@ fn dispatch(cli: Cli, format: Format) -> Result<(), CliError> {
|
||||
} else {
|
||||
Output::Human
|
||||
};
|
||||
cli::doctor::run(output)
|
||||
.map(|_| ())
|
||||
.map_err(CliError::Local)
|
||||
let checks = cli::doctor::run(output).map_err(CliError::Local)?;
|
||||
if cli::doctor::has_failures(&checks) {
|
||||
Err(CliError::RenderedExit { exit_code: 1 })
|
||||
} else {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
Command::InstallSkill(args) => {
|
||||
let output = if cli.flags.json {
|
||||
|
||||
Reference in New Issue
Block a user