Files
MINGW-packages/mingw-w64-nodejs/0010-cygpath-conversion-in-npm-shell-wrapper.patch
2016-09-14 22:06:55 +02:00

30 lines
684 B
Diff

From f9ba558f8ba7811821fc7ff959a5db3746108356 Mon Sep 17 00:00:00 2001
From: mati865 <mati865@gmail.com>
Date: Sun, 4 Sep 2016 20:02:20 +0200
Subject: [PATCH 10/13] cygpath-conversion in npm-shell wrapper
---
deps/npm/bin/npm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/deps/npm/bin/npm b/deps/npm/bin/npm
index dc01687..72bb12b 100644
--- a/deps/npm/bin/npm
+++ b/deps/npm/bin/npm
@@ -3,9 +3,9 @@
basedir=`dirname "$0"`
-case `uname` in
- *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
+if [ -x "$(command -v cygpath)" ]; then
+ basedir=`cygpath -w "$basedir"`
+fi
NODE_EXE="$basedir/node.exe"
if ! [ -x "$NODE_EXE" ]; then
--
2.9.1