Skip to content

Commit a02dc41

Browse files
committed
playwright runs in shell
1 parent 5784c34 commit a02dc41

File tree

3 files changed

+40
-25
lines changed

3 files changed

+40
-25
lines changed

dist/index.js

Lines changed: 20 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/scripts/testing.ts

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
11
import { setFailed } from "@actions/core";
22
import { stepResponse, buildComment } from "src/main";
3-
import { exec } from "@actions/exec";
3+
// import { exec } from "@actions/exec";
4+
import { execSync } from "child_process";
45

56
export const testing = async (): Promise<stepResponse> => {
67
const runCommand = async (command: string): Promise<string> => {
78
return new Promise((resolve, reject) => {
8-
exec(command, [], {
9-
listeners: {
10-
stdout: (data: Buffer) => {
11-
resolve(data.toString());
12-
},
13-
stderr: (data: Buffer) => {
14-
reject(new Error(data.toString()));
15-
},
16-
},
17-
}).catch((error: Error) => {
9+
try {
10+
const output = execSync(command, { encoding: "utf-8" });
11+
resolve(output);
12+
} catch (error) {
1813
reject(error);
19-
});
14+
}
15+
// exec(command, [], {
16+
// listeners: {
17+
// stdout: (data: Buffer) => {
18+
// resolve(data.toString());
19+
// },
20+
// stderr: (data: Buffer) => {
21+
// reject(new Error(data.toString()));
22+
// },
23+
// },
24+
// }).catch((error: Error) => {
25+
// reject(error);
26+
// });
2027
});
2128
};
2229

0 commit comments

Comments
 (0)