@@ -15,6 +15,9 @@ public GivenDotnetWorkloadRestore(ITestOutputHelper log) : base(log)
1515 [ Fact ]
1616 public void ProjectsThatDoNotSupportWorkloadsAreNotInspected ( )
1717 {
18+ var testDir = _testAssetsManager . CreateTestDirectory ( ) . Path ;
19+ var cliHome = Path . Combine ( testDir , ".home" ) ;
20+
1821 var projectPath =
1922 _testAssetsManager
2023 . CopyTestAsset ( DcProjAssetName )
@@ -23,6 +26,7 @@ public void ProjectsThatDoNotSupportWorkloadsAreNotInspected()
2326
2427 new DotnetWorkloadCommand ( Log , "restore" )
2528 . WithWorkingDirectory ( projectPath )
29+ . WithEnvironmentVariable ( "DOTNET_CLI_HOME" , cliHome )
2630 . Execute ( )
2731 . Should ( )
2832 // if we did try to restore the dcproj in this TestAsset we would fail, so passing means we didn't!
@@ -32,6 +36,9 @@ public void ProjectsThatDoNotSupportWorkloadsAreNotInspected()
3236 [ Fact ]
3337 public void ProjectsThatDoNotSupportWorkloadsAndAreTransitivelyReferencedDoNotBreakTheBuild ( )
3438 {
39+ var testDir = _testAssetsManager . CreateTestDirectory ( ) . Path ;
40+ var cliHome = Path . Combine ( testDir , ".home" ) ;
41+
3542 var projectPath =
3643 _testAssetsManager
3744 . CopyTestAsset ( TransitiveReferenceNoWorkloadsAssetName )
@@ -40,6 +47,7 @@ public void ProjectsThatDoNotSupportWorkloadsAndAreTransitivelyReferencedDoNotBr
4047
4148 new DotnetWorkloadCommand ( Log , "restore" )
4249 . WithWorkingDirectory ( projectPath )
50+ . WithEnvironmentVariable ( "DOTNET_CLI_HOME" , cliHome )
4351 . Execute ( )
4452 . Should ( )
4553 // if we did try to restore the esproj in this TestAsset we would fail, so passing means we didn't!
0 commit comments