mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Fix NRE in Test-Json (#12942)
This commit is contained in:
1 file changed
+1
-1
@@ -59,7 +59,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// <returns>Return value is unreachable since we always rethrow.</returns>
|
||||
private static bool UnwrapException(Exception e)
|
||||
{
|
||||
if (e is TargetInvocationException)
|
||||
if (e.InnerException != null && e is TargetInvocationException)
|
||||
{
|
||||
ExceptionDispatchInfo.Capture(e.InnerException).Throw();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user