Skip to content

Commit

Permalink
fix: resolve linux build issues, add git exit code 128 warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Example User committed Sep 25, 2018
1 parent f1150c8 commit c3764c8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions jobs/build.yml
Expand Up @@ -9,6 +9,9 @@ jobs:
- job: ${{ parameters.name }}
pool: ${{ parameters.pool }}
steps:
- script: git config --global user.email "example@example.com"
- script: git config --global user.name "Example Git User"
- script: npm install -g yarn
- script: npm install
- script: npm run build
- script: npm test
Expand Down
10 changes: 9 additions & 1 deletion src/git/commit.js
Expand Up @@ -27,8 +27,16 @@ function commit (sh, repoPath, message, options, done) {
child.on('exit', function (code, signal) {
if (called) return;
called = true;

if (code) {
if (code === 128) {
console.warn(`
Git exited with code 128. Did you forget to run:
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
`)
}
done(Object.assign(new Error(`git exited with error code ${code}`), { code, signal }));
} else {
done(null);
Expand Down

0 comments on commit c3764c8

Please sign in to comment.