Skip to content

Commit 397026d

Browse files
authored
Merge pull request microsoft#2 from darrenstahlmsft/RemovePathHack
Remove hack fixed in dotnet-computevirtualization
2 parents ea06e9b + ef687a5 commit 397026d

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

src/Microsoft.Windows.ComputeVirtualization.Test/ComputeTest.cs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,6 @@ public Sandbox(ContainerType containerType, Guid id)
9999
throw new ArgumentException("Invalid container type");
100100
}
101101
parent = Environment.GetEnvironmentVariable(baseLayerEnv);
102-
// BUGBUG. This is to avoid CreateSandbox throwing access violation when parent is null. It should handle this with a proper exception instead.
103-
try
104-
{
105-
parent = System.IO.Path.GetFullPath(parent);
106-
}
107-
catch
108-
{
109-
Assert.True(false, String.Format("Environment variable {0} must be set to a valid base layer", baseLayerEnv));
110-
}
111102

112103
path = String.Format("C:\\\\ComputeVirtualizationTest\\{0}", id.ToString());
113104

@@ -120,9 +111,9 @@ public Sandbox(ContainerType containerType, Guid id)
120111
{
121112
ContainerStorage.CreateSandbox(path, layers);
122113
}
123-
catch
114+
catch (Exception ex)
124115
{
125-
Assert.True(false, String.Format("Failed to create sandbox, ensure that environment variable {0} is set to a valid base layer path", servercoreBaseLayerEnv));
116+
throw new Exception(String.Format("Failed to create sandbox, ensure that environment variable {0} is set to a valid base layer path", baseLayerEnv), ex);
126117
}
127118
}
128119

0 commit comments

Comments
 (0)