diff --git a/index.js b/index.js index 9f22e10..78f53f9 100644 --- a/index.js +++ b/index.js @@ -116,7 +116,7 @@ function writeShim_ (from, to, prog, args, cb) { // basedir=`dirname "$0"` // // case `uname` in - // *CYGWIN*) basedir=`cygpath -w "$basedir"`;; + // *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; // esac // // if [ -x "$basedir/node.exe" ]; then @@ -135,7 +135,7 @@ function writeShim_ (from, to, prog, args, cb) { + "basedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\,/,g')\")\n" + "\n" + "case `uname` in\n" - + " *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;\n" + + " *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w \"$basedir\"`;;\n" + "esac\n" + "\n" diff --git a/package.json b/package.json index 95520a9..64ff4f1 100644 --- a/package.json +++ b/package.json @@ -18,4 +18,4 @@ "tap": "~0.4.11", "rimraf": "~2.2.8" } -} \ No newline at end of file +} diff --git a/test/basic.js b/test/basic.js index 0982315..acb7140 100755 --- a/test/basic.js +++ b/test/basic.js @@ -34,7 +34,7 @@ test('env shebang', function (t) { "\nbasedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\,/,g')\")"+ "\n"+ "\ncase `uname` in"+ - "\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;"+ + "\n *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w \"$basedir\"`;;"+ "\nesac"+ "\n"+ "\nif [ -x \"$basedir/node\" ]; then"+ @@ -72,7 +72,7 @@ test('env shebang with args', function (t) { "\nbasedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\,/,g')\")"+ "\n"+ "\ncase `uname` in"+ - "\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;"+ + "\n *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w \"$basedir\"`;;"+ "\nesac"+ "\n"+ "\nif [ -x \"$basedir/node\" ]; then"+ @@ -110,7 +110,7 @@ test('explicit shebang', function (t) { "\nbasedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\,/,g')\")" + "\n" + "\ncase `uname` in" + - "\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;" + + "\n *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w \"$basedir\"`;;" + "\nesac" + "\n" + "\nif [ -x \"$basedir//usr/bin/sh\" ]; then" + @@ -149,7 +149,7 @@ test('explicit shebang with args', function (t) { "\nbasedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\,/,g')\")" + "\n" + "\ncase `uname` in" + - "\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;" + + "\n *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w \"$basedir\"`;;" + "\nesac" + "\n" + "\nif [ -x \"$basedir//usr/bin/sh\" ]; then" +