File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -662,6 +662,10 @@ impl<'gctx> Workspace<'gctx> {
662662 self . requested_lockfile_path = path;
663663 }
664664
665+ pub fn get_requested_lockfile_path ( & mut self ) -> Option < & PathBuf > {
666+ self . requested_lockfile_path . as_ref ( )
667+ }
668+
665669 /// Get the lowest-common denominator `package.rust-version` within the workspace, if specified
666670 /// anywhere
667671 pub fn rust_version ( & self ) -> Option < & RustVersion > {
Original file line number Diff line number Diff line change @@ -825,6 +825,10 @@ fn make_ws_rustc_target<'gctx>(
825825 ws
826826 } ;
827827 ws. set_ignore_lock ( gctx. lock_update_allowed ( ) ) ;
828+ // if --lockfile-path is set, imply --locked
829+ if ws. get_requested_lockfile_path ( ) . is_some ( ) {
830+ ws. set_ignore_lock ( false ) ;
831+ }
828832 ws. set_require_optional_deps ( false ) ;
829833
830834 let rustc = gctx. load_global_rustc ( Some ( & ws) ) ?;
You can’t perform that action at this time.
0 commit comments