Skip to content

Commit c3764c8

Browse files
author
Example User
committed
fix: resolve linux build issues, add git exit code 128 warning
1 parent f1150c8 commit c3764c8

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

jobs/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ jobs:
99
- job: ${{ parameters.name }}
1010
pool: ${{ parameters.pool }}
1111
steps:
12+
- script: git config --global user.email "[email protected]"
13+
- script: git config --global user.name "Example Git User"
14+
- script: npm install -g yarn
1215
- script: npm install
1316
- script: npm run build
1417
- script: npm test

src/git/commit.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,16 @@ function commit (sh, repoPath, message, options, done) {
2727
child.on('exit', function (code, signal) {
2828
if (called) return;
2929
called = true;
30-
30+
3131
if (code) {
32+
if (code === 128) {
33+
console.warn(`
34+
Git exited with code 128. Did you forget to run:
35+
36+
git config --global user.email "[email protected]"
37+
git config --global user.name "Your Name"
38+
`)
39+
}
3240
done(Object.assign(new Error(`git exited with error code ${code}`), { code, signal }));
3341
} else {
3442
done(null);

0 commit comments

Comments
 (0)