We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2275f3 commit 6f3f99cCopy full SHA for 6f3f99c
src/adapters/childProcessExec.ts
@@ -1,6 +1,23 @@
1
import { exec } from "child_process";
2
-import { promisify } from "util";
3
4
import { Exec } from "./exec";
5
6
-export const childProcessExec: Exec = promisify(exec);
+export const childProcessExec: Exec = async (command: string) => {
+ return await new Promise((resolve, reject) => {
7
+ exec(
8
+ command,
9
+ {
10
+ env: {
11
+ NODE_OPTIONS: "",
12
+ },
13
14
+ (error, stdout, stderr) => {
15
+ if (error) {
16
+ reject(error);
17
+ } else {
18
+ resolve({ stderr, stdout });
19
+ }
20
21
+ );
22
+ });
23
+};
0 commit comments