Add a comment explaining the lock --check error handling (#18595)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user