Skip to content

Commit

Permalink
Update tools/check-git-version.mjs
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
  • Loading branch information
RahulGautamSingh and viceice committed Sep 15, 2021
1 parent ed2601f commit 77ebe9b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/check-git-version.mjs
Expand Up @@ -11,7 +11,11 @@ const git = simpleGit();
const stdout = await git.raw('--version');
const [gitVersion] = regex.exec(stdout);
if (semver.lt(gitVersion, GIT_MINIMUM_VERSION)) {
throw new Error(`Minimum Git version ${GIT_MINIMUM_VERSION} is required`);
if (process.env.CI) {
shell.echo(`::error ::Minimum Git version ${GIT_MINIMUM_VERSION} is required`);
} else {
throw new Error(`Minimum Git version ${GIT_MINIMUM_VERSION} is required`);
}
}
shell.echo('Found git version: ', gitVersion);
process.exit(0);
Expand Down

0 comments on commit 77ebe9b

Please sign in to comment.