File tree 1 file changed +4
-2
lines changed
src/PowerShellEditorServices/Session/Capabilities
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(
84
84
{
85
85
DscBreakpointCapability capability = null ;
86
86
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 ) )
88
90
{
89
91
using ( PowerShell powerShell = PowerShell . Create ( ) )
90
92
{
91
93
powerShell . Runspace = runspaceDetails . Runspace ;
92
94
93
95
// Attempt to import the updated DSC module
94
96
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" ) ;
96
98
powerShell . AddParameter ( "PassThru" ) ;
97
99
powerShell . AddParameter ( "ErrorAction" , "Ignore" ) ;
98
100
You can’t perform that action at this time.
0 commit comments