Skip to content

Add magic marker to specifyScriptArgs to disable argument escaping #3819

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

Closed
wants to merge 1 commit into from
Closed
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
8 changes: 7 additions & 1 deletion src/features/DebugSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,13 @@ export class SpecifyScriptArgsFeature implements vscode.Disposable {
if (text !== undefined) {
this.context.workspaceState.update(powerShellDbgScriptArgsKey, text);
}
return text;

// Add magic marker to denote we won't escape this argument, enabling it
// to be a multi-argument string. This is necessary because Code's API
// means that this command can only return a string, not a list of
// strings, and so multiple arguments will exist in a single string and
// we need PSES to not quote the string due to it containing spaces.
return "__psEditorServices_NoEscape_" + text;
}
}

Expand Down