diff options
| author | Vallie Joseph <vmjoseph@github.com> | 2022-12-01 15:20:32 +0000 |
|---|---|---|
| committer | Vallie Joseph <vmjoseph@github.com> | 2022-12-01 15:20:32 +0000 |
| commit | 428cb64f0106ba1bcbc5d0280e937a876bd17495 (patch) | |
| tree | 51dbedec5eb048bcd8dd41d457d32153569d5ebf /src/git-command-manager.ts | |
| parent | 1981a5462ebcfc39eeaf7099a6f5130a3d782f55 (diff) | |
.
Diffstat (limited to 'src/git-command-manager.ts')
| -rw-r--r-- | src/git-command-manager.ts | 11 |
1 files changed, 10 insertions, 1 deletions
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 } |
