Skip to content

Commit 004d53d

Browse files
committed
Fix Typo. Adjust whitespace.
1 parent 504a5a8 commit 004d53d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/PowerShellEditorServices.Protocol/LanguageServer/ShowHelpRequest.cs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer
1010
{
11+
1112
[Obsolete("This class is deprecated. Use ShowHelpRequest instead.")]
1213
public class ShowOnlineHelpRequest
1314
{

src/PowerShellEditorServices.Protocol/Server/LanguageServer.cs

+6-1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ public void Start()
123123

124124
this.messageHandlers.SetRequestHandler(ShowOnlineHelpRequest.Type, this.HandleShowOnlineHelpRequest);
125125
this.messageHandlers.SetRequestHandler(ShowHelpRequest.Type, this.HandleShowHelpRequest);
126+
126127
this.messageHandlers.SetRequestHandler(ExpandAliasRequest.Type, this.HandleExpandAliasRequest);
127128

128129
this.messageHandlers.SetRequestHandler(FindModuleRequest.Type, this.HandleFindModuleRequest);
@@ -251,22 +252,26 @@ protected async Task HandleShowHelpRequest(
251252
} catch [System.Management.Automation.PSInvalidOperationException] {
252253
Microsoft.PowerShell.Core\Get-Help $CommandName -Full
253254
}";
255+
254256
if (string.IsNullOrEmpty(helpParams)) { helpParams = "Get-Help"; }
255257

256258
PSCommand checkHelpPSCommand = new PSCommand()
257259
.AddScript(CheckHelpScript, useLocalScope: true)
258260
.AddArgument(helpParams);
261+
259262
await editorSession.PowerShellContext.ExecuteCommand<PSObject>(checkHelpPSCommand, sendOutputToHost: true);
260263
await requestContext.SendResult(null);
261264
}
265+
262266
protected async Task HandleShowOnlineHelpRequest(
263267
string helpParams,
264268
RequestContext<object> requestContext
265269
)
266270
{
267271
PSCommand commandDeprecated = new PSCommand()
268272
.AddCommand("Microsoft.PowerShell.Utility\\Write-Verbose")
269-
.AddParameter("Message", ";powerShell/showOnlineHelp' has been deprecated. Use 'powerShell/showHelp' instead.");
273+
.AddParameter("Message", "'powerShell/showOnlineHelp' has been deprecated. Use 'powerShell/showHelp' instead.");
274+
270275
await editorSession.PowerShellContext.ExecuteCommand<PSObject>(commandDeprecated, sendOutputToHost: true);
271276
await this.HandleShowHelpRequest(helpParams, requestContext);
272277
}

0 commit comments

Comments
 (0)