Merge pull request #850 from PowerShell/andschwa/fix-xunit

Re-enable xUnit tests on Linux
This commit is contained in:
Andy Schwartzmeyer committed 2016-04-18 19:27:55 -07:00
commit a655b439bc
6 files changed
+23 -7

No files matched your search

@@ -522,7 +522,15 @@ namespace System.Management.Automation
if (!IsInitialized)
{
var psAsmLoadContext = new PowerShellAssemblyLoadContext(basePaths);
AssemblyLoadContext.InitializeDefaultContext(psAsmLoadContext);
try
{
AssemblyLoadContext.InitializeDefaultContext(psAsmLoadContext);
}
catch (System.InvalidOperationException)
{
// We may not be able to set the default context. If we're under the
// xUnit test harness, it has already been set.
}
IsInitialized = true;
}
}