sstephenson/execjs — pull request #144 by llmora (2014-04-12 22:51:41+00:00)
Title: Allows JSCRIPT usage under CYGWIN

When running under CYGWIN in Windows, JSCript is the default runtime if nothing else is installed.

CSCript expects a path prefixed with the Windows drive letter (e.g. c:\temp\whatever.js), however as Cygwin implements a unix-like view of the filesystem, when passing the filename as "/temp/whatever.js" in the external_runtime.rb:exec_runtime function CSCript just fails as it interprets the filename as an option (options in CScript are prepended with '/'), maing execjs unable to work under Cygwin with CSCRIPT.

A few links to people suffering from this problem:

https://github.com/Shopify/dashing/issues/98
http://stackoverflow.com/questions/7548935/problem-with-execjs-doing-michael-hartl-tutorial-on-windows-execjsruntimeer/10114528#10114528
https://github.com/sstephenson/execjs/issues/78

The patch allows CSCript to work under cygwin, verified with a standalone test and running Dashing.