diff --git a/src/cli.ts b/src/cli.ts index 4da0f1d..4ed9cc2 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -24,6 +24,7 @@ import { import { mdToPdf } from "./md-to-pdf.ts"; import { getFilename } from "./utils/filename.ts"; import type { MdToPdfOptions } from "./types.ts"; +import { getBinary } from "@astral/astral"; function printHelp(): void { const help = `md2pdf: ${ @@ -89,6 +90,10 @@ if (args._) { } } +// Prepare browser +// If the browser is not installed, download it +await getBinary("chrome"); + if (paths.length < 1) { const exitCode = args._.length ? 1 : 0; if (exitCode) {