Skip to content

Commit 680c6d4

Browse files
committed
fix #1393: Always use local help to return cmdlet help text
If the user has overridden the Get-Help -Online parameter to always be true, then calls to Get-Help will always launch a new browser window to the cmdlet help. Instead, we want it to return the full cmdlet text as intended, otherwise things like intellisense and tooltips may end up opening the cmdlet help in a new browser window.
1 parent 44ea602 commit 680c6d4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/PowerShellEditorServices/Services/PowerShellContext/Utilities/CommandHelpers.cs

+1
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ public static async Task<string> GetCommandSynopsisAsync(
139139
// We use .Name here instead of just passing in commandInfo because
140140
// CommandInfo.ToString() duplicates the Prefix if one exists.
141141
.AddParameter("Name", commandInfo.Name)
142+
.AddParameter("Online", false)
142143
.AddParameter("ErrorAction", "Ignore");
143144

144145
var results = await powerShellContext.ExecuteCommandAsync<PSObject>(command, sendOutputToHost: false, sendErrorToHost: false).ConfigureAwait(false);

0 commit comments

Comments
 (0)