mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-23 04:46:08 -08:00
feat(setup): download FFmpeg from first-run setup when none is usable (#333)
This commit is contained in:
1 parent
0ae70b4ab2
commit
ee52664655
14 files changed
+571
-11
No files matched your search
@@ -46,7 +46,11 @@ function executableNames(name: string, env: NodeJS.ProcessEnv): string[] {
|
||||
return [name, ...extensions.map((extension) => `${name}${extension}`)];
|
||||
}
|
||||
|
||||
async function findOnPath(names: readonly string[], env: NodeJS.ProcessEnv): Promise<string> {
|
||||
/** First executable on `env.PATH` matching any of `names` (PATHEXT-aware on Windows), or ''. */
|
||||
export async function findOnPath(
|
||||
names: readonly string[],
|
||||
env: NodeJS.ProcessEnv,
|
||||
): Promise<string> {
|
||||
const directories = (env.PATH ?? '')
|
||||
.split(path.delimiter)
|
||||
.map((entry) => entry.trim())
|
||||
|
||||
Reference in new issue
Block a user