@@ -15,6 +15,9 @@ public GivenDotnetWorkloadRestore(ITestOutputHelper log) : base(log)
15
15
[ Fact ]
16
16
public void ProjectsThatDoNotSupportWorkloadsAreNotInspected ( )
17
17
{
18
+ var testDir = _testAssetsManager . CreateTestDirectory ( ) . Path ;
19
+ var cliHome = Path . Combine ( testDir , ".home" ) ;
20
+
18
21
var projectPath =
19
22
_testAssetsManager
20
23
. CopyTestAsset ( DcProjAssetName )
@@ -23,6 +26,7 @@ public void ProjectsThatDoNotSupportWorkloadsAreNotInspected()
23
26
24
27
new DotnetWorkloadCommand ( Log , "restore" )
25
28
. WithWorkingDirectory ( projectPath )
29
+ . WithEnvironmentVariable ( "DOTNET_CLI_HOME" , cliHome )
26
30
. Execute ( )
27
31
. Should ( )
28
32
// 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()
32
36
[ Fact ]
33
37
public void ProjectsThatDoNotSupportWorkloadsAndAreTransitivelyReferencedDoNotBreakTheBuild ( )
34
38
{
39
+ var testDir = _testAssetsManager . CreateTestDirectory ( ) . Path ;
40
+ var cliHome = Path . Combine ( testDir , ".home" ) ;
41
+
35
42
var projectPath =
36
43
_testAssetsManager
37
44
. CopyTestAsset ( TransitiveReferenceNoWorkloadsAssetName )
@@ -40,6 +47,7 @@ public void ProjectsThatDoNotSupportWorkloadsAndAreTransitivelyReferencedDoNotBr
40
47
41
48
new DotnetWorkloadCommand ( Log , "restore" )
42
49
. WithWorkingDirectory ( projectPath )
50
+ . WithEnvironmentVariable ( "DOTNET_CLI_HOME" , cliHome )
43
51
. Execute ( )
44
52
. Should ( )
45
53
// if we did try to restore the esproj in this TestAsset we would fail, so passing means we didn't!
0 commit comments