« Bugzilla Issues Index

#1457 — command-line script on Windows incorrectly quotes all arguments before exec

On Windows the script adds double quotes around the javascript shell and the javascript shell. The script should just quote the javascript shell and possibly the temp file. Removing the double quotes is a simple workaround to get the script running.

Steps to reproduce:
On Windows in the cmd.exe or in bash:
python tools\packaging\ --command=c:\builds\spidermonkey\js.exe bestPractice

actual output:
The System cannot find the path specified.

line 232 of is:
if IsWindows():
args = '"%s"' % command
quoting the entire has the effect of execing:
"c:\builds\spidermonkey\js.exe c:\users\<username>\appdata\local\temp\test262-rnsfjw.js"

the command cannot have quotes around the entire string, it must either not have any quotes (would probably fail if the path to the javascript shell had spaces in the name) or have quotes just around the shell.
c:\builds\spidermonkey\js.exe c:\users\<username>\appdata\local\temp\test262-rnsfjw.js
"c:\builds\spidermonkey\js.exe" "c:\users\<username>\appdata\local\temp\test262-rnsfjw.js"

Created attachment 31
simple patch to remove quoting entire command on windows

modifiying with this patch fixes my problem but a better solution would place quotes around the value of command.

pushed in