Skip to content

Commit 57dbc4d

Browse files
committed
Errors and output written during profile loading don't show in host
This change causes both errors and object output to be written to the host when profiles are being loaded. Users who had issues in their profile scripts thought that the scripts weren't being loaded when in fact there were errors not being displayed. Also, users using Write-Output in their profile scripts did not see that output. This change makes the PSES host consistent with the PowerShell ConsoleHost, writing both forms of output when loading profile scripts. Resolves PowerShell/vscode-powershell#689 Resolves PowerShell/vscode-powershell#663
1 parent d228c77 commit 57dbc4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PowerShellEditorServices/Session/PowerShellContext.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ public async Task LoadHostProfiles()
838838
{
839839
command = new PSCommand();
840840
command.AddCommand(profilePath, false);
841-
await this.ExecuteCommand(command);
841+
await this.ExecuteCommand<object>(command, true, true);
842842
}
843843

844844
// Gather the session details (particularly the prompt) after

0 commit comments

Comments
 (0)