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
6 changes: 3 additions & 3 deletions src/compileApplicationToWasm.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,16 @@ export async function compileApplicationToWasm(

try {
let wizerProcess = spawnSync(
wizer,
`"${wizer}"`,
[
"--inherit-env=true",
"--allow-wasi",
"--dir=.",
...starlingMonkey ? [`--dir=${dirname(wizerInput)}`] : [],
`--wasm-bulk-memory=true`,
"-r _start=wizer.resume",
`-o=${output}`,
wasmEngine,
`-o="${output}"`,
`"${wasmEngine}"`,
Comment on lines -120 to +129
Copy link
Contributor

@guybedford guybedford Jul 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally spawnSync doesn't require escaping of arguments as it automatically handles this (and this is also why windowsVerbatimArguments is an option).

Therefore unless we can prove there is a test case where this fails, I'm pretty sure this code path should support spaces okay in the command and arguments.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately it still needs the double quotes around the input on L#120 and around the args on L#128-L#129

],
{
stdio: [null, process.stdout, process.stderr],
Expand Down
2 changes: 1 addition & 1 deletion src/containsSyntaxErrors.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export function containsSyntaxErrors(input) {
`"${process.execPath}"`,
[
"--check",
input,
`"${input}"`,
],
{
stdio: [null, null, null],
Expand Down