diff --git a/lib/checks.js b/lib/checks.js index 40e6ffa..db7c0d9 100644 --- a/lib/checks.js +++ b/lib/checks.js @@ -191,10 +191,10 @@ var commands = module.exports = { var cmd = /\ [^-].*/.exec(args); if (cmd != null) { var options = args.substring(0, cmd.index).match(/--\w+/g); - if (!options.reduce((valid, item) => valid && - (allowedoptions.indexOf(item) > -1), true)) return ['invalid_format']; - if (options != null) { + if (!options.reduce((valid, item) => valid && + (allowedoptions.indexOf(item) > -1), true)) return ['invalid_format']; + var optparams = args.substring(0, cmd.index).match(/--\w+=\d+\w*/g); return ((optparams != null) && (optparams.length == options.length)) ? [] : ['healthcheck_options_missing_args'];