Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

configure: inherit from `process.env` when probing for the python ver…

  • Loading branch information...
commit e1824656c914c9169f1bd6a090052078a08fbf5e 1 parent e5ae8e1
@TooTallNate authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/configure.js
View
5 lib/configure.js
@@ -13,6 +13,7 @@ var fs = require('graceful-fs')
, semver = require('semver')
, mkdirp = require('mkdirp')
, cp = require('child_process')
+ , extend = require('util')._extend
, spawn = cp.spawn
, execFile = cp.execFile
, win = process.platform == 'win32'
@@ -72,7 +73,9 @@ function configure (gyp, argv, callback) {
}
function checkPythonVersion () {
- var env = { TERM: 'dumb', PATH: process.env.PATH }
+ var env = extend({}, process.env);
+ env.TERM = 'dumb';
+
execFile(python, ['-c', 'import platform; print(platform.python_version());'], { env: env }, function (err, stdout) {
if (err) {
return callback(err)
Please sign in to comment.
Something went wrong with that request. Please try again.