File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/PowerShellEditorServices/Session/Capabilities Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -84,15 +84,17 @@ public static DscBreakpointCapability CheckForCapability(
8484 {
8585 DscBreakpointCapability capability = null ;
8686
87- if ( runspaceDetails . Context != RunspaceContext . DebuggedRunspace )
87+ // DSC support is enabled only for Windows PowerShell.
88+ if ( ( runspaceDetails . PowerShellVersion . Version . Major < 6 ) &&
89+ ( runspaceDetails . Context != RunspaceContext . DebuggedRunspace ) )
8890 {
8991 using ( PowerShell powerShell = PowerShell . Create ( ) )
9092 {
9193 powerShell . Runspace = runspaceDetails . Runspace ;
9294
9395 // Attempt to import the updated DSC module
9496 powerShell . AddCommand ( "Import-Module" ) ;
95- powerShell . AddArgument ( @"C:\Program Files \DesiredStateConfiguration\1.0.0.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psd1" ) ;
97+ powerShell . AddArgument ( @"${env:ProgramFiles} \DesiredStateConfiguration\1.0.0.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psd1" ) ;
9698 powerShell . AddParameter ( "PassThru" ) ;
9799 powerShell . AddParameter ( "ErrorAction" , "Ignore" ) ;
98100
You can’t perform that action at this time.
0 commit comments