diff --git a/src/adapters/childProcessExec.ts b/src/adapters/childProcessExec.ts index a74cb6c1c..061e97266 100644 --- a/src/adapters/childProcessExec.ts +++ b/src/adapters/childProcessExec.ts @@ -1,23 +1,6 @@ import { exec } from "child_process"; +import { promisify } from "util"; import { Exec } from "./exec"; -export const childProcessExec: Exec = async (command: string) => { - return await new Promise((resolve, reject) => { - exec( - command, - { - env: { - NODE_OPTIONS: "", - }, - }, - (error, stdout, stderr) => { - if (error) { - reject(error); - } else { - resolve({ stderr, stdout }); - } - }, - ); - }); -}; +export const childProcessExec: Exec = promisify(exec);