run = (t, args, cwd) => {
  // Path to the allow-scripts executable
  const ALLOW_SCRIPTS_BIN = require.resolve('../src/cli')
  const options = realisticEnvOptions(cwd)
  const execPath = portableExecPath(process.execPath)
  const result = spawnSync(
    execPath,
    [ALLOW_SCRIPTS_BIN, ...args],
    options
  )

  if (result.error) {
    t.log('Result from a failed spawnSync:', result)

    t.fail(
      `Failed calling '${execPath} ${ALLOW_SCRIPTS_BIN} ${args.join(' ')}'`,
      {
        cwd,
        options,
        result,
      }
    )
  }

  // forward error output for debugging
  t.log(
    `stderr from running allow-scripts with '${args.join(' ')}'`,
    result.stderr.toString('utf-8')
  )

  return {
    status: result.status,
    stderr: result.stderr,
    stdout: result.stdout,
  }
}
Execute allow-scripts binaries with the given arguments

@param {any} t Ava test object
@param {string[]} args Arguments to pass
@param {string} cwd Working directory to execute command from
@returns {{ stderr: string; stdout: string; status: number }} Process result