mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Add --version cli arg
This commit is contained in:
parent
c5ae0be7b1
commit
d58127730f
7
packages/node_modules/node-red/red.js
vendored
7
packages/node_modules/node-red/red.js
vendored
@ -59,6 +59,7 @@ var knownOpts = {
|
|||||||
"userDir": [path],
|
"userDir": [path],
|
||||||
"verbose": Boolean,
|
"verbose": Boolean,
|
||||||
"safe": Boolean,
|
"safe": Boolean,
|
||||||
|
"version": Boolean,
|
||||||
"define": [String, Array]
|
"define": [String, Array]
|
||||||
};
|
};
|
||||||
var shortHands = {
|
var shortHands = {
|
||||||
@ -92,6 +93,7 @@ if (parsedArgs.help) {
|
|||||||
console.log(" -v, --verbose enable verbose output");
|
console.log(" -v, --verbose enable verbose output");
|
||||||
console.log(" --safe enable safe mode");
|
console.log(" --safe enable safe mode");
|
||||||
console.log(" -D, --define X=Y overwrite value in settings file");
|
console.log(" -D, --define X=Y overwrite value in settings file");
|
||||||
|
console.log(" --version show version information");
|
||||||
console.log(" -?, --help show this help");
|
console.log(" -?, --help show this help");
|
||||||
console.log(" admin <command> run an admin command");
|
console.log(" admin <command> run an admin command");
|
||||||
console.log("");
|
console.log("");
|
||||||
@ -99,6 +101,11 @@ if (parsedArgs.help) {
|
|||||||
process.exit();
|
process.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (parsedArgs.version) {
|
||||||
|
console.log("Node-RED v"+RED.version())
|
||||||
|
process.exit()
|
||||||
|
}
|
||||||
|
|
||||||
if (parsedArgs.argv.remain.length > 0) {
|
if (parsedArgs.argv.remain.length > 0) {
|
||||||
flowFile = parsedArgs.argv.remain[0];
|
flowFile = parsedArgs.argv.remain[0];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user