script/bootstrap: apm prints the current Atom ver

Lets apm know where this repository's Atom metadata is located,
so that `apm --version` prints the version of Atom being bootstrapped.

Previously, this would print "unknown" if no Atom was installed to the
system, or whatever stable version was installed...
which was irrelevant info during the bootstrapping process.

This should be more straightforward, and less confusing.
This commit is contained in:
DeeDeeG
2020-09-30 12:34:10 -04:00
parent 8bc9b6cabc
commit e49879918f

View File

@@ -36,10 +36,13 @@ if (process.platform === 'win32') deleteMsbuildFromPath()
installScriptDependencies(ci)
installApm(ci)
const apmVersionEnv = Object.assign({}, process.env);
// Set resource path so that apm can load Atom's version.
apmVersionEnv.ATOM_RESOURCE_PATH = CONFIG.repositoryRootPath;
childProcess.execFileSync(
CONFIG.getApmBinPath(),
['--version'],
{stdio: 'inherit'}
{stdio: 'inherit', env: apmVersionEnv}
)
runApmInstall(CONFIG.repositoryRootPath, ci)