File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
worker/src/worker/workers/genericWorker/lib Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export async function testFFProbe(worker: ExecutableAliasSource): Promise<string
4747}
4848export async function testFFExecutable ( ffExecutable : string ) : Promise < string | null > {
4949 try {
50- return new Promise < string | null > ( ( resolve ) => {
50+ const result = await new Promise < string | null > ( ( resolve ) => {
5151 const ffMpegProcess = spawn ( ffExecutable , [ '-version' ] )
5252 let output = ''
5353 ffMpegProcess . stderr . on ( 'data' , ( data ) => {
@@ -75,6 +75,7 @@ export async function testFFExecutable(ffExecutable: string): Promise<string | n
7575 }
7676 } )
7777 } )
78+ return result
7879 } catch ( err ) {
7980 return `Error when spawning process ${ ffExecutable } : ${ stringifyError ( err ) } `
8081 }
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ export class ExecutableDependencyHandler {
6666
6767 async testFFExecutable ( executable : string ) : Promise < string | null > {
6868 try {
69- return new Promise < string | null > ( ( resolve ) => {
69+ const result = await new Promise < string | null > ( ( resolve ) => {
7070 const execProcess = spawn ( executable , [ '-v' ] )
7171
7272 // Guard against the process not exiting on its own:
@@ -88,6 +88,7 @@ export class ExecutableDependencyHandler {
8888 resolve ( null )
8989 } )
9090 } )
91+ return result
9192 } catch ( err ) {
9293 return `Error when spawning process ${ executable } : ${ stringifyError ( err ) } `
9394 }
You can’t perform that action at this time.
0 commit comments