File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
crates/cargo-test-support/src Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1308,7 +1308,7 @@ pub trait TestEnvCommandExt: Sized {
13081308 self = self
13091309 . current_dir ( & paths:: root ( ) )
13101310 . env ( "HOME" , paths:: home ( ) )
1311- . env ( "CARGO_HOME" , paths:: home ( ) . join ( ".cargo" ) )
1311+ . env ( "CARGO_HOME" , paths:: cargo_home ( ) )
13121312 . env ( "__CARGO_TEST_ROOT" , paths:: global_root ( ) )
13131313 // Force Cargo to think it's on the stable channel for all tests, this
13141314 // should hopefully not surprise us as we add cargo features over time and
Original file line number Diff line number Diff line change @@ -279,7 +279,7 @@ impl RegistryBuilder {
279279 /// Initializes the registry.
280280 #[ must_use]
281281 pub fn build ( self ) -> TestRegistry {
282- let config_path = paths:: home ( ) . join ( ".cargo/ config.toml" ) ;
282+ let config_path = paths:: cargo_home ( ) . join ( "config.toml" ) ;
283283 t ! ( fs:: create_dir_all( config_path. parent( ) . unwrap( ) ) ) ;
284284 let prefix = if let Some ( alternative) = & self . alternative {
285285 format ! ( "{alternative}-" )
@@ -391,7 +391,7 @@ impl RegistryBuilder {
391391 }
392392
393393 if self . configure_token {
394- let credentials = paths:: home ( ) . join ( ".cargo/ credentials.toml" ) ;
394+ let credentials = paths:: cargo_home ( ) . join ( "credentials.toml" ) ;
395395 match & registry. token {
396396 Token :: Plaintext ( token) => {
397397 if let Some ( alternative) = & self . alternative {
@@ -1195,7 +1195,7 @@ impl Package {
11951195 /// Creates a new package builder.
11961196 /// Call `publish()` to finalize and build the package.
11971197 pub fn new ( name : & str , vers : & str ) -> Package {
1198- let config = paths:: home ( ) . join ( ".cargo/ config.toml" ) ;
1198+ let config = paths:: cargo_home ( ) . join ( "config.toml" ) ;
11991199 if !config. exists ( ) {
12001200 init ( ) ;
12011201 }
You can’t perform that action at this time.
0 commit comments