forked from atom/atom
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap
More file actions
executable file
·37 lines (29 loc) · 1.03 KB
/
bootstrap
File metadata and controls
executable file
·37 lines (29 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env node
'use strict'
const childProcess = require('child_process')
const CONFIG = require('./config')
const cleanDependencies = require('./lib/clean-dependencies')
const deleteMsbuildFromPath = require('./lib/delete-msbuild-from-path')
const dependenciesFingerprint = require('./lib/dependencies-fingerprint')
const installApm = require('./lib/install-apm')
const runApmInstall = require('./lib/run-apm-install')
const installScriptDependencies = require('./lib/install-script-dependencies')
const verifyMachineRequirements = require('./lib/verify-machine-requirements')
process.on('unhandledRejection', function (e) {
console.error(e.stack || e)
process.exit(1)
})
verifyMachineRequirements()
if (dependenciesFingerprint.isOutdated()) {
cleanDependencies()
}
if (process.platform === 'win32') deleteMsbuildFromPath()
installScriptDependencies()
installApm()
childProcess.execFileSync(
CONFIG.getApmBinPath(),
['--version'],
{stdio: 'inherit'}
)
runApmInstall(CONFIG.repositoryRootPath)
dependenciesFingerprint.write()