async function runWizardCLI(args, inputs, overrides = {}) {
  const {env: extraEnvVars, cwd, inputWaitCondition = 'Which wizard'} = overrides;
  const env = getCleanEnvironment(extraEnvVars);
  const wizardProcess = spawn('node', [CLI_PATH, 'wizard', ...args], {
    cwd,
    env,
  });

  wizardProcess.stdoutMemory = '';
  wizardProcess.stderrMemory = '';
  let status = -1;
  wizardProcess.stdout.on('data', chunk => (wizardProcess.stdoutMemory += chunk.toString()));
  wizardProcess.stderr.on('data', chunk => (wizardProcess.stderrMemory += chunk.toString()));
  wizardProcess.on('exit', code => (status = code));

  try {
    await waitForCondition(
      () => wizardProcess.stdoutMemory.includes(inputWaitCondition),
      () =>
        `Output never contained "${inputWaitCondition}"\nSTDOUT: ${wizardProcess.stdoutMemory}\nSTDERR:${wizardProcess.stderrMemory}`
    );
    await writeAllInputs(wizardProcess, inputs);
    await waitForCondition(() => status >= 0).catch(() => undefined);
  } finally {
    wizardProcess.kill();
  }

  return {stdout: wizardProcess.stdoutMemory, stderr: wizardProcess.stderrMemory, status};
}
@param {string[]} args
@param {string[]} inputs
@param {{cwd?: string, env?: Record<string, string>, inputWaitCondition?: string}} [overrides]
@return {{stdout: string, stderr: string, status: number, matches: {uuids: RegExpMatchArray}}}