Skip to content

Commit 75f402d

Browse files
committed
chore(core): harden against non-critical test setup errors
1 parent 82887f5 commit 75f402d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

@commitlint/core/src/test-git.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,12 @@ async function clone(source, ...args) {
2929
}
3030

3131
async function setup(cwd) {
32-
await execa('git', ['config', 'user.name', 'ava'], {cwd});
33-
await execa('git', ['config', 'user.email', '[email protected]'], {cwd});
32+
try {
33+
await execa('git', ['config', 'user.name', 'ava'], {cwd});
34+
await execa('git', ['config', 'user.email', '[email protected]'], {cwd});
35+
} catch (err) {
36+
console.warn(`git config in ${cwd} failed`, err.message);
37+
}
3438
}
3539

3640
function rand() {

0 commit comments

Comments
 (0)