-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix PSES Commands module #1211
Fix PSES Commands module #1211
Conversation
…/PowerShellEditorServices into psescommands-types-fixes
module/PowerShellEditorServices/Commands/Public/CmdletInterface.ps1
Outdated
Show resolved
Hide resolved
module/PowerShellEditorServices/Commands/Public/CmdletInterface.ps1
Outdated
Show resolved
Hide resolved
module/PowerShellEditorServices/Commands/Public/CmdletInterface.ps1
Outdated
Show resolved
Hide resolved
module/PowerShellEditorServices/Commands/Public/CmdletInterface.ps1
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM assuming the question checks out
@@ -3,7 +3,7 @@ Register-EditorCommand ` | |||
-DisplayName 'Open Editor Profile' ` | |||
-SuppressOutput ` | |||
-ScriptBlock { | |||
param([Microsoft.PowerShell.EditorServices.Services.PowerShellContext.EditorContext]$context) | |||
param([Microsoft.PowerShell.EditorServices.Extensions.EditorContext, Microsoft.PowerShell.EditorServices]$context) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this syntax work with 5.1? I vaguely remember you running into issues where you needed the full qualification in 5.1. Or was it that the full qualification didn't work but this did?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good thinking! Now that you mention it, I remember a similar issue (with PSRL type invocation).
But I just tested it and this works in 5.1:
PS C:\Users\Robert Holt\Documents\Dev\sandbox> [microsoft.powershell.editorservices.extensions.editorcommand, microsoft.powershell.editorservices]
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True False EditorCommand System.Object
Fixes PowerShell/vscode-powershell#2495