We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35abbe0 commit 203928bCopy full SHA for 203928b
src/cli.ts
@@ -24,6 +24,7 @@ import {
24
import { mdToPdf } from "./md-to-pdf.ts";
25
import { getFilename } from "./utils/filename.ts";
26
import type { MdToPdfOptions } from "./types.ts";
27
+import { getBinary } from "@astral/astral";
28
29
function printHelp(): void {
30
const help = `md2pdf: ${
@@ -89,6 +90,10 @@ if (args._) {
89
90
}
91
92
93
+// Prepare browser
94
+// If the browser is not installed, download it
95
+await getBinary("chrome");
96
+
97
if (paths.length < 1) {
98
const exitCode = args._.length ? 1 : 0;
99
if (exitCode) {
0 commit comments