mirror of
https://github.com/electron/node-gyp.git
synced 2025-09-15 13:43:40 +02:00
configure: inherit from process.env
when probing for the python version number
See https://groups.google.com/d/topic/nodejs/qzF9rdMjg6k/discussion Closes #409
This commit is contained in:
parent
e5ae8e162b
commit
e1824656c9
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue