From 268f1ca4c7fff6b634a67e0917242b709439fcf5 Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Sun, 19 Jul 2015 13:06:43 -0400 Subject: [PATCH] Use result of `which` when searching for python. Fixes: https://github.com/nodejs/node-gyp/issues/667 Fixes: https://github.com/nodejs/node-gyp/issues/750 PR-URL: https://github.com/nodejs/node-gyp/pull/668 Reviewed-By: Ben Noordhuis --- lib/configure.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/configure.js b/lib/configure.js index e10475840f..4e0652961e 100644 --- a/lib/configure.js +++ b/lib/configure.js @@ -331,6 +331,10 @@ function findPython (python, callback) { } } else { log.verbose('`which` succeeded', python, execPath) + // Found the `python` exceutable, and from now on we use it explicitly. + // This solves #667 and #750 (`execFile` won't run batch files + // (*.cmd, and *.bat)) + python = execPath checkPythonVersion() } })