mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
fixes #29429
This commit is contained in:
@@ -4,13 +4,15 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
const cp = require('child_process');
|
||||
const path = require('path');
|
||||
const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
||||
|
||||
function npmInstall(location) {
|
||||
const result = cp.spawnSync(npm, ['install'], {
|
||||
cwd: location ,
|
||||
stdio: 'inherit'
|
||||
});
|
||||
function npmInstall(location, opts) {
|
||||
opts = opts || {};
|
||||
opts.cwd = location;
|
||||
opts.stdio = 'inherit';
|
||||
|
||||
const result = cp.spawnSync(npm, ['install'], opts);
|
||||
|
||||
if (result.error || result.status !== 0) {
|
||||
process.exit(1);
|
||||
@@ -43,4 +45,17 @@ const extensions = [
|
||||
|
||||
extensions.forEach(extension => npmInstall(`extensions/${extension}`));
|
||||
|
||||
npmInstall(`build`); // node modules required for build
|
||||
function npmInstallBuildDependencies() {
|
||||
// make sure we install gulp watch for the system installed
|
||||
// node, since that is the driver of gulp
|
||||
const env = Object.assign({}, process.env);
|
||||
|
||||
delete env['npm_config_disturl'];
|
||||
delete env['npm_config_target'];
|
||||
delete env['npm_config_runtime'];
|
||||
|
||||
npmInstall(path.join(path.dirname(__dirname), 'lib', 'watch'), { env });
|
||||
}
|
||||
|
||||
npmInstall(`build`); // node modules required for build
|
||||
npmInstallBuildDependencies(); // node modules for watching, specific to host node version, not electron
|
||||
Reference in New Issue
Block a user