This repository was archived by the owner on Aug 11, 2022. It is now read-only.

Description
When trying to run jezebel on windows after installing it with npm, it fails. C:\Users\AppData\Roaming\npm\jezebel.cmd looks like this:
:: Created by npm, please don't edit manually.
@IF EXIST "%~dp0\NODE_PATH=./lib:$NODE_PATH.exe" (
"%~dp0\NODE_PATH=./lib:$NODE_PATH.exe" node %~dp0\node_modules\jezebel\bin\jezebel" %*
) ELSE (
NODE_PATH=./lib:$NODE_PATH node "%~dp0\node_modules\jezebel\bin\jezebel" %*
)
Which is syntactically incorrect.
Looking at the jezebel repository the bin\jezebel file has the following first line:
#!/usr/bin/env NODE_PATH=./lib:$NODE_PATH node
Looking at the npm source code, specifically node_modules\cmd-shim:22 shows:
, shebangExpr = /^#\!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/
This regular expression was not built with the possibillity of variable declarations in mind.
It should be adapted to extract the variable declarations and translate them to the proper cmd syntax:
set NODE_PATH=.lib:%NODE_PATH%
in this case.