code: function askInstallModules(modules, packageJsonExists) {
  
      // If no modules, do nothing.
      if (modules.length === 0) {
          return Promise.resolve();
      }
  
      log.info("The config that you've selected requires the following dependencies:\n");
      log.info(modules.join(" "));
      return inquirer.prompt([
          {
              type: "confirm",
              name: "executeInstallation",
              message: "Would you like to install them now with npm?",
              default: true,
              when() {
                  return modules.length && packageJsonExists;
              }
          }
      ]).then(({ executeInstallation }) => {
          if (executeInstallation) {
              installModules(modules);
          }
      });
  }
docs: /* istanbul ignore next: no need to test inquirer 
  Ask user to install modules.
  @param   {string[]} modules Array of modules to be installed.
  @param   {boolean} packageJsonExists Indicates if package.json is existed.
  @returns {Promise} Answer that indicates if user wants to install.