fix: Handle ffmpeg binary check failure gracefully

This commit is contained in:
2025-01-07 09:51:51 +08:00
parent 3f8117edc2
commit 3f91216bd8

View File

@@ -11,7 +11,12 @@ export async function check_ffmpeg_binary(p: string) {
stderr: "null",
args: ["-h"],
});
const c = cmd.spawn();
let c: Deno.ChildProcess | undefined;
try {
c = cmd.spawn();
} catch (_) {
return false;
}
const o = await c.output();
return o.code === 0;
}