Skip to content

Commit 0e3c5f2

Browse files
committed
Auto merge of #6061 - dwijnand:specify-lockfile-path-in---locked-error, r=alexcrichton
Specify lockfile path in --locked error msg Fixes #4603
2 parents 7c34b13 + b8c24f3 commit 0e3c5f2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/cargo/ops/lockfile.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ pub fn write_pkg_lockfile(ws: &Workspace, resolve: &Resolve) -> CargoResult<()>
8484
"--frozen"
8585
};
8686
bail!(
87-
"the lock file needs to be updated but {} was passed to \
87+
"the lock file {} needs to be updated but {} was passed to \
8888
prevent this",
89+
ws.root().to_path_buf().join("Cargo.lock").display(),
8990
flag
9091
);
9192
}

tests/testsuite/lockfile_compat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ fn locked_correct_error() {
480480
.with_stderr(
481481
"\
482482
[UPDATING] `[..]` index
483-
error: the lock file needs to be updated but --locked was passed to prevent this
483+
error: the lock file [CWD]/Cargo.lock needs to be updated but --locked was passed to prevent this
484484
",
485485
).run();
486486
}

0 commit comments

Comments
 (0)