include description

This commit is contained in:
Partouf
2018-10-26 12:53:33 +02:00
parent a2446e25b8
commit f08ee5e8ef
+4 -2
View File
@@ -31,12 +31,14 @@ class BaseParser {
return compiler.exec(compiler.compiler.exe, [helpArg]).then(result => {
const options = {};
if (result.code === 0) {
const optionFinder = /^\s*(--?[-a-zA-Z]+)/;
const optionFinder = /^\s*(--?[-a-zA-Z]+)\s*(.*)/;
utils.eachLine(result.stdout + result.stderr, line => {
const match = line.match(optionFinder);
if (!match) return;
options[match[1]] = true;
options[match[1]] = {
"description": match[2]
};
});
}
compiler.compiler.possibleArguments = options;