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 {
1308
1308
self = self
1309
1309
. current_dir ( & paths:: root ( ) )
1310
1310
. env ( "HOME" , paths:: home ( ) )
1311
- . env ( "CARGO_HOME" , paths:: home ( ) . join ( ".cargo" ) )
1311
+ . env ( "CARGO_HOME" , paths:: cargo_home ( ) )
1312
1312
. env ( "__CARGO_TEST_ROOT" , paths:: global_root ( ) )
1313
1313
// Force Cargo to think it's on the stable channel for all tests, this
1314
1314
// 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 {
279
279
/// Initializes the registry.
280
280
#[ must_use]
281
281
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" ) ;
283
283
t ! ( fs:: create_dir_all( config_path. parent( ) . unwrap( ) ) ) ;
284
284
let prefix = if let Some ( alternative) = & self . alternative {
285
285
format ! ( "{alternative}-" )
@@ -391,7 +391,7 @@ impl RegistryBuilder {
391
391
}
392
392
393
393
if self . configure_token {
394
- let credentials = paths:: home ( ) . join ( ".cargo/ credentials.toml" ) ;
394
+ let credentials = paths:: cargo_home ( ) . join ( "credentials.toml" ) ;
395
395
match & registry. token {
396
396
Token :: Plaintext ( token) => {
397
397
if let Some ( alternative) = & self . alternative {
@@ -1195,7 +1195,7 @@ impl Package {
1195
1195
/// Creates a new package builder.
1196
1196
/// Call `publish()` to finalize and build the package.
1197
1197
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" ) ;
1199
1199
if !config. exists ( ) {
1200
1200
init ( ) ;
1201
1201
}
You can’t perform that action at this time.
0 commit comments