[grunt/run] be more lenient with flag prefix parsing

This commit is contained in:
spalger 2016-02-12 16:01:46 -07:00
parent 53b35c4ad4
commit 508d94540e

View file

@ -18,9 +18,8 @@ module.exports = function (grunt) {
];
const kbnServerFlags = grunt.option.flags().reduce(function (flags, flag) {
const matches = flag.match(/^--kbnServer(\.\w+)+=/);
if (matches) {
flags.push(flag.replace(/^--kbnServer\./, '--'));
if (flag.startsWith('--kbnServer.')) {
flags.push(`--${flag.slice(12)}`);
}
return flags;