File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/PowerShellEditorServices/Session Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -199,14 +199,14 @@ function New-EditorFile {
199199 [string] $PSEditModule
200200 )
201201
202- Register-EngineEvent -SourceIdentifier PSESRemoteSessionOpenFile -Forward
202+ Register-EngineEvent -SourceIdentifier PSESRemoteSessionOpenFile -Forward -SupportEvent
203203 New-Module -ScriptBlock ([Scriptblock]::Create($PSEditModule)) -Name PSEdit | Import-Module -Global
204204 " ;
205205
206206 private const string RemovePSEditFunctionScript = @"
207207 Get-Module PSEdit | Remove-Module
208208
209- Get-EventSubscriber -SourceIdentifier PSESRemoteSessionOpenFile -EA Ignore | Unregister-Event
209+ Unregister-Event -SourceIdentifier PSESRemoteSessionOpenFile -Force -ErrorAction Ignore
210210 " ;
211211
212212 private const string SetRemoteContentsScript = @"
You can’t perform that action at this time.
0 commit comments