import { Command } from "@oclif/core";
import { makeKnownFailuresFlags } from "../../command-helpers.mjs";
import { runKnownFailuresRenderCommand } from "../../known-failures.mjs";

export default class KnownFailuresRenderCommand extends Command {
  static summary = "Render known failures markdown";

  static enableJsonFlag = true;

  static flags = makeKnownFailuresFlags();

  async run() {
    const { flags } = await this.parse(KnownFailuresRenderCommand);
    await runKnownFailuresRenderCommand({
      ...flags,
    });
    return { ok: true };
  }
}
