]> git.proxmox.com Git - cargo.git/commitdiff
Specify lockfile path in --locked error msg
authorDale Wijnand <dale.wijnand@gmail.com>
Thu, 20 Sep 2018 15:51:04 +0000 (16:51 +0100)
committerDale Wijnand <dale.wijnand@gmail.com>
Thu, 20 Sep 2018 15:52:19 +0000 (16:52 +0100)
src/cargo/ops/lockfile.rs
tests/testsuite/lockfile_compat.rs

index 6f655b8c30915bd323ac5aef626715700b11bddc..91eb0b4d81e21c1bbeb814e166ad7bc6708b2dec 100644 (file)
@@ -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
         );
     }
index 218144a421fb80834d9ac9d22d6dfc4b26ae6499..a4adcdc83032bc6a58065a510ab7371c7392d1b4 100644 (file)
@@ -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();
 }