Tell the user how to revert dev setup intellij

This commit is contained in:
Serial 2022-07-28 03:40:21 -04:00
parent cdd4dfc6d6
commit 1ed7bff32c

View File

@ -13,7 +13,7 @@ pub enum CliError {
IoError(io::Error),
RustfmtNotInstalled,
WalkDirError(walkdir::Error),
RaSetupActive,
IntellijSetupActive,
}
impl From<io::Error> for CliError {
@ -48,7 +48,7 @@ fn try_run(context: &FmtContext) -> Result<bool, CliError> {
.expect("Failed to read clippy Cargo.toml")
.contains(&"[target.'cfg(NOT_A_PLATFORM)'.dependencies]")
{
return Err(CliError::RaSetupActive);
return Err(CliError::IntellijSetupActive);
}
rustfmt_test(context)?;
@ -93,11 +93,11 @@ fn output_err(err: CliError) {
CliError::WalkDirError(err) => {
eprintln!("error: {}", err);
},
CliError::RaSetupActive => {
CliError::IntellijSetupActive => {
eprintln!(
"error: a local rustc repo is enabled as path dependency via `cargo dev setup intellij`.
Not formatting because that would format the local repo as well!
Please revert the changes to Cargo.tomls first."
Please revert the changes to Cargo.tomls with `cargo dev remove intellij`."
);
},
}