hotfix: correct execAsync execution

This commit is contained in:
Nicolas Meienberger 2023-09-27 21:18:06 +02:00
parent f0831db9d6
commit 86556a6477

View file

@ -7,7 +7,8 @@ type ExecResult = { stdout: string; stderr: string };
export const execAsync = async (...args: ExecAsyncParams): Promise<ExecResult> => { export const execAsync = async (...args: ExecAsyncParams): Promise<ExecResult> => {
try { try {
return await promisify(exec)(...args); const { stdout, stderr } = await promisify(exec)(...args);
return { stdout, stderr };
} catch (error) { } catch (error) {
if (error instanceof Error) { if (error instanceof Error) {
return { stderr: error.message, stdout: '' }; return { stderr: error.message, stdout: '' };