Skip to content

Commit 1ba12c9

Browse files
committed
New debug for the exec output
1 parent c0d0b0d commit 1ba12c9

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

lib/deploy.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,21 @@ const exec = require('@actions/exec');
3939
const glob = require('@actions/glob');
4040
const exec_command = (command) => __awaiter(void 0, void 0, void 0, function* () {
4141
let stdout = '';
42+
let stderr = '';
4243
const options = {};
4344
options.listeners = {
4445
stdout: (data) => {
4546
stdout += data.toString();
47+
},
48+
stderr: (data) => {
49+
stderr += data.toString();
4650
}
4751
};
4852
options.env = {
4953
"VERCEL_TOKEN": "process.env.VERCEL_TOKEN"
5054
};
5155
yield exec.exec(command, [], options);
56+
console.log(stdout, stderr);
5257
return stdout;
5358
});
5459
const deploy = (command, deployAlias) => __awaiter(void 0, void 0, void 0, function* () {

src/deploy.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,22 @@ const glob = require('@actions/glob');
1313

1414
const exec_command = async (command: string): Promise<string> => {
1515
let stdout: string = '';
16+
let stderr: string = '';
1617

1718
const options: ExecOptions = {};
1819
options.listeners = {
1920
stdout: (data: Buffer) => {
2021
stdout += data.toString();
22+
},
23+
stderr: (data: Buffer) => {
24+
stderr += data.toString();
2125
}
2226
};
2327
options.env = {
2428
"VERCEL_TOKEN": "process.env.VERCEL_TOKEN"
2529
}
2630
await exec.exec(command, [], options);
31+
console.log(stdout, stderr);
2732
return stdout
2833
}
2934

0 commit comments

Comments
 (0)