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 5dbc3e1 commit 2273dcbCopy full SHA for 2273dcb
src/adapters/childProcessExec.ts
@@ -1,23 +1,6 @@
1
import { exec } from "child_process";
2
+import { promisify } from "util";
3
4
import { Exec } from "./exec";
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
-};
+export const childProcessExec: Exec = promisify(exec);
0 commit comments