From 9684017cd699538427966653a79db20f982c30ec Mon Sep 17 00:00:00 2001 From: Vallie Joseph Date: Wed, 30 Nov 2022 20:35:36 +0000 Subject: [PATCH] adding stderr --- dist/index.js | 4 +++- src/git-command-manager.ts | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dist/index.js b/dist/index.js index c675ba5..307d9fd 100644 --- a/dist/index.js +++ b/dist/index.js @@ -7388,6 +7388,7 @@ class GitCommandManager { branchList(remote) { return __awaiter(this, void 0, void 0, function* () { const result = []; + const stderr = []; // Note, this implementation uses "rev-parse --symbolic-full-name" because the output from // "branch --list" is more difficult when in a detached HEAD state. // Note, this implementation uses "rev-parse --symbolic-full-name" because there is a bug @@ -7401,7 +7402,7 @@ class GitCommandManager { } const listeners = { stderr: (data) => { - core.debug(data.toString()); + stderr.push(data.toString()); } }; const output = yield this.execGit(args, false, false, listeners); @@ -7417,6 +7418,7 @@ class GitCommandManager { result.push(branch); } } + core.debug(stderr.join('\n')); return result; }); } diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts index d150d0f..afcb285 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -91,6 +91,7 @@ class GitCommandManager { async branchList(remote: boolean): Promise { const result: string[] = [] + const stderr: string[] = [] // Note, this implementation uses "rev-parse --symbolic-full-name" because the output from // "branch --list" is more difficult when in a detached HEAD state. @@ -106,7 +107,7 @@ class GitCommandManager { const listeners = { stderr: (data: Buffer) => { - core.debug(data.toString()) + stderr.push(data.toString()) } } const output = await this.execGit(args, false, false, listeners) @@ -123,7 +124,7 @@ class GitCommandManager { result.push(branch) } } - + core.debug(stderr.join('\n')) return result }