This commit is contained in:
Alexander T
2019-06-20 10:51:29 +03:00
parent 882dfd265c
commit 38652d4cd7
10 changed files with 56 additions and 54 deletions

View File

@@ -167,14 +167,14 @@ namespace Commands {
listAuthors.description = "List known and unknown authors for a given spec, e.g. 'node authors.js listAuthors origin/release-2.6..origin/release-2.7'";
}
var args = process.argv.slice(2);
const args = process.argv.slice(2);
if (args.length < 1) {
console.log("Usage: node authors.js [command]");
console.log("List of commands: ");
Object.keys(Commands).forEach(k => console.log(` ${k}: ${(Commands as any)[k].description}`));
}
else {
var cmd: Function = (Commands as any)[args[0]];
const cmd: Function = (Commands as any)[args[0]];
if (cmd === undefined) {
console.log("Unknown command " + args[1]);
}