@@ -91,21 +91,23 @@ public void ItCreatesAFirstUseSentinelFileUnderTheDotDotNetFolder()
9191 [ Fact ]
9292 public void ItDoesNotCreateAFirstUseSentinelFileUnderTheDotDotNetFolderWhenInternalReportInstallSuccessIsInvoked ( )
9393 {
94- var newHome = Path . Combine ( _testDirectory , "new_home" ) ;
95- var newHomeFolder = new DirectoryInfo ( Path . Combine ( newHome , ".dotnet" ) ) ;
94+ var emptyHome = Path . Combine ( _testDirectory , "empty_home" ) ;
9695
9796 var command = new DotnetCommand ( )
9897 . WithWorkingDirectory ( _testDirectory ) ;
99- command . Environment [ "HOME" ] = newHome ;
100- command . Environment [ "USERPROFILE" ] = newHome ;
101- command . Environment [ "APPDATA" ] = newHome ;
98+ command . Environment [ "HOME" ] = emptyHome ;
99+ command . Environment [ "USERPROFILE" ] = emptyHome ;
100+ command . Environment [ "APPDATA" ] = emptyHome ;
102101 command . Environment [ "DOTNET_CLI_TEST_FALLBACKFOLDER" ] = _nugetFallbackFolder . FullName ;
103102 command . Environment [ "DOTNET_SKIP_FIRST_TIME_EXPERIENCE" ] = "" ;
103+ // Disable to prevent the creation of the .dotnet folder by optimizationdata.
104+ command . Environment [ "DOTNET_DISABLE_MULTICOREJIT" ] = "true" ;
104105 command . Environment [ "SkipInvalidConfigurations" ] = "true" ;
105106
106107 command . ExecuteWithCapturedOutput ( "internal-reportinstallsuccess test" ) . Should ( ) . Pass ( ) ;
107108
108- newHomeFolder . Should ( ) . NotHaveFile ( $ "{ GetDotnetVersion ( ) } .dotnetFirstUseSentinel") ;
109+ var emptyHomeFolder = new DirectoryInfo ( Path . Combine ( emptyHome , ".dotnet" ) ) ;
110+ emptyHomeFolder . Should ( ) . NotExist ( ) ;
109111 }
110112
111113 [ Fact ]
0 commit comments