Skip to content

Commit

Permalink
Specify lockfile path in --locked error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand committed Sep 20, 2018
1 parent 57ac392 commit b8c24f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/cargo/ops/lockfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ pub fn write_pkg_lockfile(ws: &Workspace, resolve: &Resolve) -> CargoResult<()>
"--frozen"
};
bail!(
"the lock file needs to be updated but {} was passed to \
"the lock file {} needs to be updated but {} was passed to \
prevent this",
ws.root().to_path_buf().join("Cargo.lock").display(),
flag
);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/lockfile_compat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ fn locked_correct_error() {
.with_stderr(
"\
[UPDATING] `[..]` index
error: the lock file needs to be updated but --locked was passed to prevent this
error: the lock file [CWD]/Cargo.lock needs to be updated but --locked was passed to prevent this
",
).run();
}

0 comments on commit b8c24f3

Please sign in to comment.