Skip to content

Commit 3f91216

Browse files
committed
fix: Handle ffmpeg binary check failure gracefully
1 parent 3f8117e commit 3f91216

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

thumbnail/ffmpeg_binary.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ export async function check_ffmpeg_binary(p: string) {
1111
stderr: "null",
1212
args: ["-h"],
1313
});
14-
const c = cmd.spawn();
14+
let c: Deno.ChildProcess | undefined;
15+
try {
16+
c = cmd.spawn();
17+
} catch (_) {
18+
return false;
19+
}
1520
const o = await c.output();
1621
return o.code === 0;
1722
}

0 commit comments

Comments
 (0)