Skip to content

Commit 9a9f893

Browse files
Apply suggestions from code review
Thanks Patrick! Co-authored-by: Patrick Meinecke <SeeminglyScience@users.noreply.github.com>
1 parent 6d6bc34 commit 9a9f893

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ public async Task<bool> TryStartAsync(HostStartOptions startOptions, Cancellatio
329329
function global:PSConsoleHostReadLine { $global:__psEditorServices_userInput }
330330
331331
# Execute the provided shell integration script.
332-
try { . "{{startOptions.ShellIntegrationScript}}" } catch {}
332+
try { . '{{startOptions.ShellIntegrationScript}}' } catch {}
333333
""";
334334
await EnableShellIntegrationAsync(setupShellIntegration, cancellationToken).ConfigureAwait(false);
335335
_logger.LogDebug("Shell integration enabled!");
@@ -1085,7 +1085,7 @@ private void InvokeInput(string input, CancellationToken cancellationToken)
10851085
{
10861086
// Save the user's input to our special global variable so PSConsoleHostReadLine can read it.
10871087
InvokePSCommand(
1088-
new PSCommand().AddScript($"$global:__psEditorServices_userInput = \"{input}\""),
1088+
new PSCommand().AddScript("$global:__psEditorServices_userInput = $args[0]").AddArgument(input),
10891089
new PowerShellExecutionOptions { ThrowOnError = false, WriteOutputToHost = false },
10901090
cancellationToken);
10911091

0 commit comments

Comments
 (0)