Skip to content

Commit 3bfd7a5

Browse files
author
Maxim Lobanov
committed
debug
1 parent daf2e7d commit 3bfd7a5

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

dist/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1698,14 +1698,20 @@ class SDKManager {
16981698
}
16991699
async run(args, printOutputInDebug) {
17001700
let stdout = "";
1701+
let previousPrintedLine = "";
17011702
const outputListener = (data) => {
1703+
const line = data.toString();
1704+
if (line === previousPrintedLine) {
1705+
return;
1706+
}
17021707
stdout += data.toString();
17031708
if (printOutputInDebug) {
17041709
utils_1.splitByEOL(data.toString()).map(s => s.trim()).filter(Boolean).forEach(s => core.debug(s));
17051710
}
1711+
previousPrintedLine = stdout;
17061712
};
17071713
const options = {
1708-
silent: true,
1714+
silent: false,
17091715
ignoreReturnCode: true,
17101716
failOnStdErr: false,
17111717
listeners: {

src/sdk-manager.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,21 @@ export class SDKManager {
3030

3131
private async run(args: string[], printOutputInDebug: boolean): Promise<string> {
3232
let stdout = "";
33+
let previousPrintedLine = "";
3334
const outputListener = (data: Buffer): void => {
35+
const line = data.toString();
36+
if (line === previousPrintedLine) {
37+
return;
38+
}
39+
3440
stdout += data.toString();
3541
if (printOutputInDebug) {
3642
splitByEOL(data.toString()).map(s => s.trim()).filter(Boolean).forEach(s => core.debug(s));
3743
}
44+
previousPrintedLine = stdout;
3845
};
3946
const options: exec.ExecOptions = {
40-
silent: true,
47+
silent: false,
4148
ignoreReturnCode: true,
4249
failOnStdErr: false,
4350
listeners: {

0 commit comments

Comments
 (0)