mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-06-06 05:38:44 +08:00
fix: Handle ffmpeg binary check failure gracefully
This commit is contained in:
@@ -11,7 +11,12 @@ export async function check_ffmpeg_binary(p: string) {
|
|||||||
stderr: "null",
|
stderr: "null",
|
||||||
args: ["-h"],
|
args: ["-h"],
|
||||||
});
|
});
|
||||||
const c = cmd.spawn();
|
let c: Deno.ChildProcess | undefined;
|
||||||
|
try {
|
||||||
|
c = cmd.spawn();
|
||||||
|
} catch (_) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
const o = await c.output();
|
const o = await c.output();
|
||||||
return o.code === 0;
|
return o.code === 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user