mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 20:54:07 -08:00
f9f05621a1
* ⬆️ Upgrade to ESLint 8 * 📦 Update package-lock.json * 👕 Add lint exceptions * 👕 Add more lint exceptions * ➖ Remove `tslint` from some packages * 👕 Except init file * 📦 Update `package-lock.json` * 📦 Update `package-lock.json` * 👕 Add exceptions to new lines coming from `master ` Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
35 lines
984 B
JavaScript
Executable file
35 lines
984 B
JavaScript
Executable file
#!/usr/bin/env node
|
|
|
|
var path = require('path');
|
|
|
|
// Make sure that it also find the config folder when it
|
|
// did get started from another folder that the root one.
|
|
process.env.NODE_CONFIG_DIR = process.env.NODE_CONFIG_DIR || path.join(__dirname, 'config');
|
|
|
|
// Check if version should be displayed
|
|
var versionFlags = [
|
|
'-v',
|
|
'-V',
|
|
'--version',
|
|
];
|
|
if (versionFlags.includes(process.argv.slice(-1)[0])) {
|
|
console.log(require('../package').version);
|
|
process.exit(0);
|
|
}
|
|
|
|
if (process.argv.length === 2) {
|
|
// When no command is given choose by default start
|
|
process.argv.push('start');
|
|
}
|
|
|
|
var nodeVersion = process.versions.node.split('.');
|
|
|
|
if (parseInt(nodeVersion[0], 10) < 14) {
|
|
console.log(`\nYour Node.js version (${process.versions.node}) is too old to run n8n.\nPlease update at least to Node.js v14 or to the recommended Node.js v16!\n`);
|
|
process.exit(1);
|
|
}
|
|
|
|
require('@oclif/command').run()
|
|
.then(require('@oclif/command/flush'))
|
|
.catch(require('@oclif/errors/handle'));
|