'use strict';

let childProcess = require('child-process-promise');

const runCommandList = async (commandList) => {
  const commandString = commandList.join(' && ');

  try {
    const runResult = await childProcess.exec(commandString);

    if (runResult.childProcess.exitCode > 0) {
      throw new Error(runResult.stderr);
    }

    return { success: true };
  } catch (error) {
    return { success: false, commandString, message: error.message };
  }
};

module.exports = runCommandList;

@@ -230,16 +230,69 @@
 String);
+ // eslint-disable-line security/detect-child-process
 %0A%0A    if

add lint exception for child_process.exec