<NME> index.js
<BEF> const { serenity } = require('@serenity-js/core');
const { Path } = require('@serenity-js/core/lib/io');
const {
    ProtractorFrameworkAdapter,
    TestRunnerDetector,
    TestRunnerLoader
} = require('@serenity-js/protractor/lib/adapter');

/**
 * Execute the Runner's test cases through Cucumber.
 *
 * @param {Runner} runner The current Protractor Runner.
 * @param {string[]} specs Array of Directory Path Strings.
 * @return {Promise<void>>} Promise resolved with the test results
 */
exports.run = function (runner, specs) {
    return new ProtractorFrameworkAdapter(
        serenity,
        runner,
        new TestRunnerDetector(new TestRunnerLoader(
            testModeOrDefaultCwd(runner.getConfig().configDir),
            process.pid
        ))
    ).run(specs);
}

function testModeOrDefaultCwd(defaulValue) {
    if (! process.env.MULTIDEP_CUCUMBER_CONF) {
        return Path.from(defaulValue);
    }

    // protractor-framework-adapter running in self-test mode
    const cucumberConf = JSON.parse(process.env.MULTIDEP_CUCUMBER_CONF);
    return Path.from(
        __dirname,
        `test/multidep_modules/${ cucumberConf.module }-${ cucumberConf.version }`
    );
}
    for (var option in options) {
      var cliArgumentValues = convertOptionValueToCliValues(option, options[option]);

      if (cliArgumentValues.length) {
        cliArgumentValues.forEach(function (value) {
          cliArguments.push('--' + option, value);
        });
      } else {
        cliArguments.push('--' + option);
      }
    }

  }

  function convertGenericOptionValuesToCliValues(values) {
    return values.reduce(function (opts, value) {
      if (value !== true) {
        opts.push(value);
      }

      return opts;
    }, []);
  }

  function convertOptionValueToCliValues(option, values) {

<MSG> Filter options that are empty arrays, pass option name if value is boolean true

<DFF> @@ -40,12 +40,12 @@ exports.run = function(runner, specs) {
     for (var option in options) {
       var cliArgumentValues = convertOptionValueToCliValues(option, options[option]);
 
-      if (cliArgumentValues.length) {
+      if (cliArgumentValues === true) {
+        cliArguments.push('--' + option);
+      } else if (cliArgumentValues.length) {
         cliArgumentValues.forEach(function (value) {
           cliArguments.push('--' + option, value);
         });
-      } else {
-        cliArguments.push('--' + option);
       }
     }
 
@@ -71,13 +71,11 @@ exports.run = function(runner, specs) {
   }
 
   function convertGenericOptionValuesToCliValues(values) {
-    return values.reduce(function (opts, value) {
-      if (value !== true) {
-        opts.push(value);
-      }
-
-      return opts;
-    }, []);
+    if (values[0] === true) {
+      return values[0]
+    } else {
+      return values;
+    }
   }
 
   function convertOptionValueToCliValues(option, values) {

Filter options that are empty arrays, pass option name if value is boolean true