diff --git a/src/adapters/childProcessExec.ts b/src/adapters/childProcessExec.ts index 061e97266..a74cb6c1c 100644 --- a/src/adapters/childProcessExec.ts +++ b/src/adapters/childProcessExec.ts @@ -1,6 +1,23 @@ import { exec } from "child_process"; -import { promisify } from "util"; import { Exec } from "./exec"; -export const childProcessExec: Exec = promisify(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 }); + } + }, + ); + }); +};