Ignore errors from rustfmt which may trigger error notification

This commit is contained in:
yukang 2025-04-14 09:33:38 +08:00
parent 8365cf853e
commit 5abe9e66b0

View file

@ -2418,7 +2418,11 @@ fn run_rustfmt(
Ok(None) Ok(None)
} }
// rustfmt panicked at lexing/parsing the file // rustfmt panicked at lexing/parsing the file
Some(101) if !rustfmt_not_installed && captured_stderr.starts_with("error[") => { Some(101)
if !rustfmt_not_installed
&& (captured_stderr.starts_with("error[")
|| captured_stderr.starts_with("error:")) =>
{
Ok(None) Ok(None)
} }
_ => { _ => {