mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
18 lines
483 B
JavaScript
18 lines
483 B
JavaScript
const fs = require('fs');
|
|
|
|
const foundNodeVersion = process.versions.node;
|
|
const expectedNodeVersion = fs
|
|
.readFileSync('.nvmrc')
|
|
.toString()
|
|
.trim();
|
|
|
|
if (foundNodeVersion !== expectedNodeVersion) {
|
|
console.log(`Current node version: ${foundNodeVersion}`);
|
|
console.log(`Expected node version: ${expectedNodeVersion}`);
|
|
console.log(
|
|
`Remember to 'npm run clean && npm run bootstrap' after installing the expected version.`,
|
|
);
|
|
console.log();
|
|
process.exit(1);
|
|
}
|