Skip to content

Commit ad8725f

Browse files
committed
classify another lockfile (generation) error
1 parent 0d56c42 commit ad8725f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/prepare.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ fn run_command(cmd: Command) -> anyhow::Result<()> {
165165
|| line.contains("error: invalid type: ")
166166
|| line.contains("error: cyclic feature dependency: feature ")
167167
|| line.contains("error: cyclic package dependency: package ")
168+
|| (line.contains("error: package collision in the lockfile: packages ")
169+
&& line.contains(
170+
" are different, but only one can be written to lockfile unambiguously",
171+
))
168172
{
169173
broken_deps = true;
170174
} else if line.contains("error: failed to parse lock file at")
@@ -409,7 +413,7 @@ pub enum PrepareError {
409413
/// Some of the dependencies do not exist anymore.
410414
#[error("the crate depends on missing dependencies: \n\n{0}")]
411415
MissingDependencies(String),
412-
/// cargo rejected the lockfile
416+
/// cargo rejected (generating) the lockfile
413417
#[error("the crate has a broken lockfile: \n\n{0}")]
414418
InvalidCargoLock(String),
415419
/// git clone/fetch failed, but repository didn't appear to be private

0 commit comments

Comments
 (0)