Skip to content

Commit ed01799

Browse files
author
Eli Skeggs
committed
refactor: avoid unused GIT override
1 parent 1390119 commit ed01799

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ const commitlint = require('@commitlint/cli');
66
const IF_CI = !!argv.ifCi;
77
const PR_ONLY = !!argv.prOnly;
88

9-
// Allow to override used bins for testing purposes
10-
const GIT = process.env.JENKINS_COMMITLINT_GIT_BIN || 'git';
9+
// Allow override of used bins for testing purposes
1110
const COMMITLINT = process.env.JENKINS_COMMITLINT_BIN;
1211

1312
const REQUIRED = ['GIT_COMMIT'];
@@ -50,7 +49,7 @@ async function main() {
5049
}
5150

5251
async function getBase({ branch, tip = 'HEAD' }) {
53-
const result = await execa(GIT, ['merge-base', branch, tip]);
52+
const result = await execa('git', ['merge-base', branch, tip]);
5453
return result.stdout;
5554
}
5655

@@ -62,7 +61,7 @@ async function lint(args, options) {
6261
}
6362

6463
async function rawCommit(hash) {
65-
const result = await execa(GIT, ['show', '--pretty=format:%B', hash]);
64+
const result = await execa('git', ['show', '--pretty=format:%B', hash]);
6665
return result.stdout;
6766
}
6867

0 commit comments

Comments
 (0)