Tell user if they try to use an old NodeJS version
This commit is contained in:
parent
d5df5daadf
commit
7ddc16fcc7
1 changed files with 6 additions and 0 deletions
6
bin/run
6
bin/run
|
@ -1,5 +1,11 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
const NODE_MAJOR_VERSION = process.versions.node.split('.')[0];
|
||||||
|
|
||||||
|
if (NODE_MAJOR_VERSION < 17) {
|
||||||
|
throw new Error('This tool requires NodeJS 17 or later');
|
||||||
|
}
|
||||||
|
|
||||||
require('@oclif/command').run()
|
require('@oclif/command').run()
|
||||||
.then(require('@oclif/command/flush'))
|
.then(require('@oclif/command/flush'))
|
||||||
.catch(require('@oclif/errors/handle'))
|
.catch(require('@oclif/errors/handle'))
|
||||||
|
|
Loading…
Reference in a new issue