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 af774eb commit 67ab0e8Copy full SHA for 67ab0e8
helpers/action/exec.ts
@@ -6,15 +6,16 @@ import { exec as coreExec } from "@actions/exec";
6
* This action fails if data is outputted to stderr
7
* @param commandLine The command to run
8
*/
9
-export const exec = async (commandLine: string) => {
+export const exec = async (commandLine: string, failOnStdErr: boolean = true, silent: boolean = true) => {
10
let stdoutData = "";
11
- await coreExec(commandLine, undefined, {
+ await coreExec(commandLine.trim(), undefined, {
12
listeners: {
13
stdout: (data: Buffer) => {
14
stdoutData += data.toString();
15
},
16
17
- failOnStdErr: true
+ failOnStdErr,
18
+ silent
19
});
20
return stdoutData;
-};
21
+};
0 commit comments