Skip to content

Commit 2273dcb

Browse files
author
Josh Goldberg
authored
Revert "Ignore parent NODE_OPTIONS in child_process exec (#1152)" (#1161)
This reverts commit 6f3f99c.
1 parent 5dbc3e1 commit 2273dcb

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

src/adapters/childProcessExec.ts

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,6 @@
11
import { exec } from "child_process";
2+
import { promisify } from "util";
23

34
import { Exec } from "./exec";
45

5-
export const childProcessExec: Exec = async (command: string) => {
6-
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-
};
6+
export const childProcessExec: Exec = promisify(exec);

0 commit comments

Comments
 (0)