diff options
| author | Thomas Boop <52323235+thboop@users.noreply.github.com> | 2020-09-23 09:41:47 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-23 09:41:47 -0400 |
| commit | 6943eced8faa00b363a577a3e573551e2255efac (patch) | |
| tree | 4b1d350c4cd428896ead4534cb625044b9e89d0d /src/git-command-manager.ts | |
| parent | 0e68cab139db160d6e9937a23b4cbb50fa4b3627 (diff) | |
Remove unneeded commit information from build logs (#345)v2.3.3
* Remove unneeded commit information from stdout
Diffstat (limited to 'src/git-command-manager.ts')
| -rw-r--r-- | src/git-command-manager.ts | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts index 059e3d8..409a161 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -31,7 +31,7 @@ export interface IGitCommandManager { isDetached(): Promise<boolean> lfsFetch(ref: string): Promise<void> lfsInstall(): Promise<void> - log1(): Promise<string> + log1(format?: string): Promise<string> remoteAdd(remoteName: string, remoteUrl: string): Promise<void> removeEnvironmentVariable(name: string): void revParse(ref: string): Promise<string> @@ -254,8 +254,10 @@ class GitCommandManager { await this.execGit(['lfs', 'install', '--local']) } - async log1(): Promise<string> { - const output = await this.execGit(['log', '-1']) + async log1(format?: string): Promise<string> { + var args = format ? ['log', '-1', format] : ['log', '-1'] + var silent = format ? false : true + const output = await this.execGit(args, false, silent) return output.stdout } @@ -390,7 +392,8 @@ class GitCommandManager { private async execGit( args: string[], - allowAllExitCodes = false + allowAllExitCodes = false, + silent = false ): Promise<GitOutput> { fshelper.directoryExistsSync(this.workingDirectory, true) @@ -409,6 +412,7 @@ class GitCommandManager { const options = { cwd: this.workingDirectory, env, + silent, ignoreReturnCode: allowAllExitCodes, listeners: { stdout: (data: Buffer) => { |
