Add a comment explaining the lock --check error handling (#18595)

This commit is contained in:
Zanie Blue
2026-03-20 15:34:55 -05:00
committed by GitHub
parent 5a1c3451c8
commit c1cd212dd5
+2
View File
@@ -253,6 +253,8 @@ pub(crate) async fn lock(
Ok(ExitStatus::Success)
}
// Lock mismatches from `--check`/`--locked` are expected validation failures.
// Handle them here so we return exit code 1 instead of bubbling up as an error (exit code 2).
Err(err @ ProjectError::LockMismatch(..)) => {
writeln!(printer.stderr(), "{}", err.to_string().bold())?;
Ok(ExitStatus::Failure)