File tree 2 files changed +8
-0
lines changed
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> {
662
662
self . requested_lockfile_path = path;
663
663
}
664
664
665
+ pub fn get_requested_lockfile_path ( & mut self ) -> Option < & PathBuf > {
666
+ self . requested_lockfile_path . as_ref ( )
667
+ }
668
+
665
669
/// Get the lowest-common denominator `package.rust-version` within the workspace, if specified
666
670
/// anywhere
667
671
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>(
825
825
ws
826
826
} ;
827
827
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
+ }
828
832
ws. set_require_optional_deps ( false ) ;
829
833
830
834
let rustc = gctx. load_global_rustc ( Some ( & ws) ) ?;
You can’t perform that action at this time.
0 commit comments