Skip to content

Commit

Permalink
Added warning for old versions
Browse files Browse the repository at this point in the history
  • Loading branch information
githubsaturn committed Feb 8, 2019
1 parent 314b4b1 commit c6b8f7a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/commands/caprover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

const packagejson = require('../../package.json')
import * as updateNotifier from 'update-notifier'

const versionOfNode = Number(process.version.split('.')[0])

if (versionOfNode < 6) {
console.log(
'Unsupported version of node. You need to update your local NodeJS version.'
)
process.exit(1)
} else if (versionOfNode < 8) {
console.log(
'Your NodeJS is too old. CapRover is tested on the latest NodeJS engine. Update your local NodeJS version for a better experience.'
)
}

updateNotifier({ pkg: packagejson }).notify({ isGlobal: true })

import StdOutUtil from '../utils/StdOutUtil'
Expand Down

0 comments on commit c6b8f7a

Please sign in to comment.