diff --git a/src/server/validateDependencies.ts b/src/server/validateDependencies.ts index 7b072fc21543f..93567db641dd5 100644 --- a/src/server/validateDependencies.ts +++ b/src/server/validateDependencies.ts @@ -220,14 +220,14 @@ async function missingDLOPENLibraries(browser: BrowserDescriptor): Promise stdout.toLowerCase().includes(library.toLowerCase()); return libraries.filter(library => !isLibraryAvailable(library)); } -function spawnAsync(cmd: string, args: string[], options: any): Promise<{stdout: string, stderr: string, code: number}> { +function spawnAsync(cmd: string, args: string[], options: any): Promise<{stdout: string, stderr: string, code: number, error?: Error}> { const process = spawn(cmd, args, options); return new Promise(resolve => { @@ -236,6 +236,7 @@ function spawnAsync(cmd: string, args: string[], options: any): Promise<{stdout: process.stdout.on('data', data => stdout += data); process.stderr.on('data', data => stderr += data); process.on('close', code => resolve({stdout, stderr, code})); + process.on('error', error => resolve({stdout, stderr, code: 0, error})); }); }