Skip to content

Wrap script paths with single instead of double quotes #1940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public sealed class StartEditorServicesCommand : PSCmdlet

public StartEditorServicesCommand()
{
//Sets the distribution channel to "PSES" so starts can be distinguished in PS7+ telemetry
// Sets the distribution channel to "PSES" so starts can be distinguished in PS7+ telemetry
Environment.SetEnvironmentVariable("POWERSHELL_DISTRIBUTION_CHANNEL", "PSES");
_disposableResources = new List<IDisposable>();
_loggerUnsubscribers = new List<IDisposable>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ internal async Task LaunchScriptAsync(string scriptToLaunch)
{
// For a saved file we just execute its path (after escaping it).
command = PSCommandHelpers.BuildDotSourceCommandWithArguments(
string.Concat('"', scriptToLaunch, '"'), _debugStateService?.Arguments);
string.Concat("'", scriptToLaunch, "'"), _debugStateService?.Arguments);
}
else // It's a URI to an untitled script, or a raw script.
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public async Task UsesDotSourceOperatorAndQuotesAsync()
ConfigurationDoneResponse configDoneResponse = await PsesDebugAdapterClient.RequestConfigurationDone(new ConfigurationDoneArguments()).ConfigureAwait(true);
Assert.NotNull(configDoneResponse);
Assert.Collection(await GetLog().ConfigureAwait(true),
(i) => Assert.StartsWith(". \"", i));
(i) => Assert.StartsWith(". '", i));
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,11 +583,11 @@ public async Task RecordsF5CommandInPowerShellHistory()

// Check the PowerShell history
Assert.Single(historyResult);
Assert.Equal(". \"" + debugScriptFile.FilePath + "\"", historyResult[0]);
Assert.Equal(". '" + debugScriptFile.FilePath + "'", historyResult[0]);

// Check the stubbed PSReadLine history
Assert.Single(testReadLine.history);
Assert.Equal(". \"" + debugScriptFile.FilePath + "\"", testReadLine.history[0]);
Assert.Equal(". '" + debugScriptFile.FilePath + "'", testReadLine.history[0]);
}

[Fact]
Expand Down