mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 07:28:08 +03:00
Exclude PATH entries with msbuild.exe to fix node-gyp on Windows
This commit is contained in:
parent
76f9f43e6a
commit
df4e552596
15
script/build
15
script/build
@ -2,9 +2,24 @@
|
||||
var cp = require('./utils/child-process-wrapper.js');
|
||||
var runGrunt = require('./utils/run-grunt.js');
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
|
||||
process.chdir(path.dirname(__dirname));
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
process.env['PATH'] = process.env['PATH']
|
||||
.split(';')
|
||||
.filter(function(p) {
|
||||
if (fs.existsSync(path.resolve(p, 'msbuild.exe'))) {
|
||||
console.log('Excluding "' + p + '" from PATH to avoid msbuild.exe mismatch')
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
})
|
||||
.join(';');
|
||||
}
|
||||
|
||||
cp.safeExec('node script/bootstrap', function() {
|
||||
// build/node_modules/.bin/grunt "$@"
|
||||
var args = process.argv.slice(2);
|
||||
|
Loading…
Reference in New Issue
Block a user