diff options
| author | eric sciple <ericsciple@users.noreply.github.com> | 2019-12-09 19:15:39 -0500 |
|---|---|---|
| committer | eric sciple <ericsciple@users.noreply.github.com> | 2019-12-09 19:15:39 -0500 |
| commit | 850c5af644079513a188c19cd4e77a9cba3ce0a2 (patch) | |
| tree | 3f88eb56a5331aebfd7ae9c83cd9fcdf8fc4e999 /src/git-command-manager.ts | |
| parent | 60d4cd61a0add35bf3fff62db8d96cc40adbdcf3 (diff) | |
.
Diffstat (limited to 'src/git-command-manager.ts')
| -rw-r--r-- | src/git-command-manager.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts index 6e4f22f..70dce8f 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -5,6 +5,10 @@ import * as io from '@actions/io' import * as path from 'path' import {GitVersion} from './git-version' +// Auth header not supported before 2.9 +// Wire protocol v2 not supported before 2.18 +export const MinimumGitVersion = new GitVersion('2.18') + export interface IGitCommandManager { branchDelete(remote: boolean, branch: string): Promise<void> branchExists(remote: boolean, pattern: string): Promise<boolean> @@ -338,13 +342,9 @@ class GitCommandManager { } // Minimum git version - // Note: - // - Auth header not supported before 2.9 - // - Wire protocol v2 not supported before 2.18 - const minimumGitVersion = new GitVersion('2.18') - if (!gitVersion.checkMinimum(minimumGitVersion)) { + if (!gitVersion.checkMinimum(MinimumGitVersion)) { throw new Error( - `Minimum required git version is ${minimumGitVersion}. Your git ('${this.gitPath}') is ${gitVersion}` + `Minimum required git version is ${MinimumGitVersion}. Your git ('${this.gitPath}') is ${gitVersion}` ) } |
