hotfix: correct execAsync execution
This commit is contained in:
parent
f0831db9d6
commit
86556a6477
1 changed files with 2 additions and 1 deletions
|
@ -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: '' };
|
||||||
|
|
Loading…
Reference in a new issue