From 779fc4382f44707d5ab8d015ee221dd11bdc836e Mon Sep 17 00:00:00 2001 From: Patrick Meinecke Date: Sun, 7 Oct 2018 21:43:45 -0400 Subject: [PATCH] Fix exception when remoting from Windows to non-Windows Checking for DSC capability is currently done by attempting to import a drive qualified path to where we would expect the DSC module. This fails during parameter validation due to an invalid drive. This change broadens the scope of the catch block to account for this exception. --- .../Session/Capabilities/DscBreakpointCapability.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PowerShellEditorServices/Session/Capabilities/DscBreakpointCapability.cs b/src/PowerShellEditorServices/Session/Capabilities/DscBreakpointCapability.cs index 8a28f5893..a5907b0d5 100644 --- a/src/PowerShellEditorServices/Session/Capabilities/DscBreakpointCapability.cs +++ b/src/PowerShellEditorServices/Session/Capabilities/DscBreakpointCapability.cs @@ -104,7 +104,7 @@ public static DscBreakpointCapability CheckForCapability( { moduleInfo = powerShell.Invoke().FirstOrDefault(); } - catch (CmdletInvocationException e) + catch (RuntimeException e) { logger.WriteException("Could not load the DSC module!", e); }