isaacs/npm — pull request #2479 by domenic (2012-05-28 22:25:11+00:00)
Title: Quote paths passed to child_process.exec in tests.

This is necessary on Windows; otherwise you get

2> 'c:\PROGRAM' is not recognized as an internal or external command,
2> operable program or batch file.

since Node/npm are in "C:\Program Files (x86)\nodejs", which has spaces in it.

---

I don't know if this works on POSIX, so someone should test that before merging.

An alternative would be to use `child_process.execFile`, but then you'd have to distinguish between the command and the arguments to the command, which is not currently one.