Ensure script/bootstrap works after cleaning dependencies up

This commit is contained in:
Antonio Scandurra 2016-08-29 13:40:17 +02:00
parent 77cba66c2d
commit 14611926ac
5 changed files with 5 additions and 8 deletions

View File

@ -21,15 +21,12 @@ const appMetadata = require(path.join(repositoryRootPath, 'package.json'))
const apmMetadata = require(path.join(apmRootPath, 'package.json'))
const channel = getChannel()
const apmBinPath = getApmBinPath()
const npmBinPath = getNpmBinPath()
module.exports = {
appMetadata, apmMetadata, channel,
repositoryRootPath, apmRootPath, scriptRootPath,
buildOutputPath, docsOutputPath, intermediateAppPath, symbolsPath,
electronDownloadPath, atomHomeDirPath, homeDirPath,
apmBinPath, npmBinPath
getApmBinPath, getNpmBinPath
}
function getChannel () {

View File

@ -8,7 +8,7 @@ const CONFIG = require('../config')
module.exports = function () {
console.log('Installing apm')
childProcess.execFileSync(
CONFIG.npmBinPath,
CONFIG.getNpmBinPath(),
['--global-style', '--loglevel=error', 'install'],
{env: process.env, cwd: CONFIG.apmRootPath}
)

View File

@ -17,7 +17,7 @@ module.exports = function () {
installEnv.npm_config_target_arch = 'ia32'
}
childProcess.execFileSync(
CONFIG.apmBinPath,
CONFIG.getApmBinPath(),
['--loglevel=error', 'install'],
{env: installEnv, cwd: CONFIG.repositoryRootPath, stdio: 'inherit'}
)

View File

@ -8,7 +8,7 @@ const CONFIG = require('../config')
module.exports = function () {
console.log('Installing script dependencies')
childProcess.execFileSync(
CONFIG.npmBinPath,
CONFIG.getNpmBinPath(),
['--loglevel=error', 'install'],
{env: process.env, cwd: CONFIG.scriptRootPath}
)

View File

@ -25,7 +25,7 @@ function verifyNode () {
}
function verifyNpm () {
const stdout = childProcess.execFileSync(CONFIG.npmBinPath, ['--version'], {env: process.env})
const stdout = childProcess.execFileSync(CONFIG.getNpmBinPath(), ['--version'], {env: process.env})
const fullVersion = stdout.toString().trim()
const majorVersion = fullVersion.split('.')[0]
if (majorVersion >= 3) {