mirror of
https://gitdl.cn/https://github.com/chakralinux/gtk.git
synced 2025-02-03 23:07:25 +08:00
30 lines
956 B
Diff
30 lines
956 B
Diff
*** a/verify-machine-requirements.js Mon May 15 19:46:51 2017
|
|
--- b/verify-machine-requirements.js Sun May 21 17:38:05 2017
|
|
***************
|
|
*** 7,30 ****
|
|
const CONFIG = require('../config')
|
|
|
|
module.exports = function () {
|
|
- verifyNode()
|
|
verifyNpm()
|
|
if (process.platform === 'win32') {
|
|
verifyPython()
|
|
}
|
|
}
|
|
|
|
- function verifyNode () {
|
|
- const fullVersion = process.versions.node
|
|
- const majorVersion = fullVersion.split('.')[0]
|
|
- if (majorVersion >= 4 && majorVersion < 7) {
|
|
- console.log(`Node:\tv${fullVersion}`)
|
|
- } else if (majorVersion >= 7) {
|
|
- throw new Error(`Atom does not build properly on node v7+. node v${fullVersion} is installed.`)
|
|
- } else {
|
|
- throw new Error(`node v4+ is required to build Atom. node v${fullVersion} is installed.`)
|
|
- }
|
|
- }
|
|
|
|
function verifyNpm () {
|
|
const stdout = childProcess.execFileSync(CONFIG.getNpmBinPath(), ['--version'], {env: process.env})
|
|
--- 7,18 ----
|