substack/browser-launcher — pull request #30 by vweevers (2014-07-25 09:50:11+00:00)
Title: Use cross-spawn for Windows

This fixes Windows, where things like `phantomjs` can't be found by core spawn. From [cross-spawn](https://github.com/IndigoUnited/node-cross-spawn)'s readme:

---

Node has issues when using spawn on Windows:

- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318)
- It does not allow you to run `del` or `dir`

All these issues are handled correctly by `cross-spawn`.
There are some known modules, such as [win-spawn](https://github.com/ForbesLindesay/win-spawn), that try to solve this but they are either broken or provide faulty escaping of shell arguments.