async function runCli(t, argsOrOpts, maybeOpts = {}) {
  /** @type {string[]} */
  let args
  /** @type {import('node:child_process').ExecFileOptions} */
  let opts

  if (Array.isArray(argsOrOpts)) {
    args = argsOrOpts
    opts = maybeOpts
  } else {
    opts = argsOrOpts ?? {}
    args = []
  }

  // the env is needed to resolve npm
  opts = {
    ...opts,
    env: { PATH: process.env.PATH, ...opts.env, NO_COLOR: '1' },
  }
  args = [...new Set([...args, '--dryRun', '--yes'])]

  const command = [process.execPath, RELATIVE_LAVERNA_SCRIPT, ...args].join(' ')
  t.log(`Command: ${command}`)

  /** @type {RunCliResult | RunCliFailureResult} >} */
  let result
  try {
    const execResult = await execFile(
      process.execPath,
      [LAVERNA_SCRIPT, ...args],
      opts
    )

    result = {
      cmd: `${process.execPath} ${LAVERNA_SCRIPT} ${args.join(' ')}`,
      opts,
      isError: false,
      ...execResult,
    }
  } catch (e) {
    const err = /**
     * @type {import('node:child_process').ExecFileException & {
     *   stderr: string
     *   stdout: string
     * }}
     */ (e)
    result = Object.assign(err, {
      cmd: err.cmd ?? `${process.execPath} ${LAVERNA_SCRIPT} ${args.join(' ')}`,
      opts,
      isError: true,
    })
  }
  return result
}
Runs `laverna` CLI with given args and/or options

- Forces `NO_COLOR` env var to be set to `1` to prevent kleur from coloring
  output
- Forces `--dryRun` to be set to prevent `npm publish` from actually running
- Forces `--yes` to be set to prevent confirmation prompt

@template [Context=unknown] Default is `unknown`
@param {import('ava').ExecutionContext<Context>} t - AVA test context
@param {string[] | import('node:child_process').ExecFileOptions} [argsOrOpts]
@param {import('node:child_process').ExecFileOptions} [maybeOpts]
@returns {Promise<RunCliResult | RunCliFailureResult>}