Skip to content
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 @@ -18,7 +18,7 @@ if "%~2"=="" (
)

REM The first argument is the output file; consume it.
set output_file=%1
set "output_file=%~1"
shift

REM `shift` doesn't affect `%*`, so we have to manually remove the first argument
Expand Down
9 changes: 8 additions & 1 deletion extensions/positron-supervisor/src/KallichoreAdapterApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,14 @@ export class KCApi implements PositronSupervisorApi {
wrapperPath = 'powershell.exe';
// Build the arguments for the wrapper script
const escapedWrapper = kernelWrapper.replace(/'/g, "''");
const escapedArgs = shellArgs.map(arg => `'${arg.replace(/'/g, "''")}'`).join(', ');
const escapedArgs = shellArgs.map(arg => {
const escapedArg = arg.replace(/'/g, "''");
// Start-Process joins -ArgumentList elements with spaces when
// building the cmd.exe command line for .bat invocation. Wrap
// args that contain spaces in double-quotes so cmd.exe treats
// them as single tokens.
return arg.includes(' ') ? `'"${escapedArg}"'` : `'${escapedArg}'`;
}).join(', ');
shellArgs = [
'-WindowStyle', 'Hidden',
'-Command',
Expand Down
Loading