File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 11use cargo:: core:: resolver:: ResolveError ;
2- use cargo:: core:: { compiler:: CompileMode , Workspace } ;
2+ use cargo:: core:: { compiler:: CompileMode , Shell , Workspace } ;
33use cargo:: ops:: { self , CompileOptions } ;
44use cargo:: util:: { config:: Config , errors:: ManifestError } ;
55
6+ use crate :: support:: install:: cargo_home;
67use crate :: support:: project;
8+ use crate :: support:: registry;
79
810/// Tests inclusion of a `ManifestError` pointing to a member manifest
911/// when that manifest fails to deserialize.
@@ -139,7 +141,9 @@ fn member_manifest_version_error() {
139141 . file ( "bar/src/main.rs" , "fn main() {}" )
140142 . build ( ) ;
141143
142- let config = Config :: default ( ) . unwrap ( ) ;
144+ // Prevent this test from accessing the network by setting up .cargo/config.
145+ registry:: init ( ) ;
146+ let config = Config :: new ( Shell :: new ( ) , cargo_home ( ) , cargo_home ( ) ) ;
143147 let ws = Workspace :: new ( & p. root ( ) . join ( "Cargo.toml" ) , & config) . unwrap ( ) ;
144148 let compile_options = CompileOptions :: new ( & config, CompileMode :: Build ) . unwrap ( ) ;
145149 let member_bar = ws. members ( ) . find ( |m| & * m. name ( ) == "bar" ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments