From 428cb64f0106ba1bcbc5d0280e937a876bd17495 Mon Sep 17 00:00:00 2001 From: Vallie Joseph Date: Thu, 1 Dec 2022 15:20:32 +0000 Subject: . --- src/git-command-manager.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/git-command-manager.ts') diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts index 95004f2..2cac95d 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -7,6 +7,7 @@ import * as refHelper from './ref-helper' import * as regexpHelper from './regexp-helper' import * as retryHelper from './retry-helper' import {GitVersion} from './git-version' +import stream, {Writable} from 'stream' // Auth header not supported before 2.9 // Wire protocol v2 not supported before 2.18 @@ -428,16 +429,24 @@ class GitCommandManager { // }} const listenersD = {...customListeners, ...defaultListener} const stdout: string[] = [] + let temp = '' const options = { cwd: this.workingDirectory, env, silent, ignoreReturnCode: allowAllExitCodes, - listeners: listenersD + listeners: listenersD, + errStream: new stream.Writable({ + write(chunk, _, next) { + temp += chunk.toString() + next() + } + }) } result.exitCode = await exec.exec(`"${this.gitPath}"`, args, options) result.stdout = stdout.join('') + core.info(temp.length.toString()) return result } -- cgit v1.2.3