Install using npm installed during installation of script dependencies

This commit is contained in:
sadick254
2021-12-03 14:19:52 +03:00
parent eb6258fd50
commit 36562eaea1
3 changed files with 4 additions and 8 deletions

View File

@@ -77,7 +77,7 @@ function getAppName(channel) {
return channel === 'stable'
? 'Atom'
: `Atom ${process.env.ATOM_CHANNEL_DISPLAY_NAME ||
channel.charAt(0).toUpperCase() + channel.slice(1)}`;
channel.charAt(0).toUpperCase() + channel.slice(1)}`;
}
function getExecutableName(channel, appName) {
@@ -113,8 +113,6 @@ function getApmBinPath() {
}
function getNpmBinPath(external = false) {
if (process.env.NPM_BIN_PATH) return process.env.NPM_BIN_PATH;
const npmBinName = process.platform === 'win32' ? 'npm.cmd' : 'npm';
const localNpmBinPath = path.resolve(
repositoryRootPath,
@@ -123,7 +121,5 @@ function getNpmBinPath(external = false) {
'.bin',
npmBinName
);
return !external && fs.existsSync(localNpmBinPath)
? localNpmBinPath
: npmBinName;
return localNpmBinPath;
}

View File

@@ -10,7 +10,7 @@ process.env.ELECTRON_CUSTOM_VERSION = CONFIG.appMetadata.electronVersion;
module.exports = function(ci) {
console.log('Installing script dependencies');
childProcess.execFileSync(
CONFIG.getNpmBinPath(ci),
'npm',
['--loglevel=error', ci ? 'ci' : 'install'],
{ env: process.env, cwd: CONFIG.scriptRootPath }
);

View File

@@ -7,7 +7,7 @@ const CONFIG = require('../config');
module.exports = function(ci) {
verifyNode();
verifyNpm(ci);
// verifyNpm(ci);
verifyPython();
};