Skip to content

Commit 07c8ee1

Browse files
run profile paths together (#1171)
* run profile paths together * codacy
1 parent 845d9dc commit 07c8ee1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/PowerShellEditorServices/Services/PowerShellContext/PowerShellContextService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,12 +1161,12 @@ public async Task LoadHostProfilesAsync()
11611161
if (this.profilePaths != null)
11621162
{
11631163
// Load any of the profile paths that exist
1164+
var command = new PSCommand();
11641165
foreach (var profilePath in GetLoadableProfilePaths(this.profilePaths))
11651166
{
1166-
PSCommand command = new PSCommand();
1167-
command.AddCommand(profilePath, false);
1168-
await this.ExecuteCommandAsync<object>(command, sendOutputToHost: true, sendErrorToHost: true).ConfigureAwait(false);
1167+
command.AddCommand(profilePath, false).AddStatement();
11691168
}
1169+
await ExecuteCommandAsync<object>(command, sendOutputToHost: true).ConfigureAwait(false);
11701170

11711171
// Gather the session details (particularly the prompt) after
11721172
// loading the user's profiles.

0 commit comments

Comments
 (0)