Skip to content

Commit de81cc4

Browse files
authored
fix #1393: Always use local help to return cmdlet help text (#1394)
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 2db5fbe commit de81cc4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
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)