From 51d2b252fcca6799d65b813faa655a497794e46c Mon Sep 17 00:00:00 2001 From: fromkeith Date: Sun, 12 Feb 2017 19:27:37 -0700 Subject: [PATCH] fix(Makefile): npm path not properly set for cygwin (#1698) Detect npm-path properly in cygwin (fixes windows build). Looks for '_NT' to detect if we are on cygwin or not. --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8f396e674..342f1f1a7 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,14 @@ version=$(shell node -pe "require('./package.json').version") dist-out-dir = _dist pub-dir = $(dist-out-dir)/$(version) -npm-bin = $(shell npm bin) + +# properly get npm-bin in cygwin (Eg. CYGWIN_NT-10.0) +platform = $(shell uname -s) +ifeq ($(findstring _NT,$(platform)),_NT) + npm-bin = $(shell cygpath -u $(shell npm bin)) +else + npm-bin = $(shell npm bin) +endif build-out-dir = _build src-dir = client