mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-27 17:19:42 -04:00
Add preinstall step to check node version (#2507)
This commit is contained in:
1 parent
61b27ae3c4
commit
2b74221549
2 files changed
+19
-1
No files matched your search
@@ -0,0 +1,17 @@
|
||||
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);
|
||||
}
|
||||
Reference in new issue
Block a user