Skip to content

fix: output error messages if git commands failed - #102

Merged
kentcdodds merged 1 commit into
all-contributors:masterfrom
chinesedfan:issue48
Jun 25, 2018
Merged

kentcdodds merged 1 commit into
all-contributors:masterfrom
chinesedfan:issue48

Conversation

@chinesedfan

Copy link
Copy Markdown
Contributor

What:

Fixes #48.

Why:

The current usage of cb is not very suitable. It expects (err, ret), but buf/code is sent as err, which results in error.message to be undefined.

- git.stderr.on('data', cb)
- git.on('close', cb)
+ git.stderr.on('data', (buf) => {});
+ git.on('close', (code) => {})

How:

Collect all error messages and return.

Checklist:

  • Documentation
  • Tests
  • Ready to be merged
  • Added myself to contributors table

@codecov-io

Copy link
Copy Markdown

Codecov Report

Merging #102 into master will decrease coverage by 0.67%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #102      +/-   ##
==========================================
- Coverage    58.5%   57.83%   -0.68%     
==========================================
  Files          19       19              
  Lines         429      434       +5     
  Branches       71       73       +2     
==========================================
  Hits          251      251              
- Misses        149      152       +3     
- Partials       29       31       +2
Impacted Files Coverage Δ
src/util/git.js 23.52% <0%> (-4.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2a98af3...fbed0d6. Read the comment docs.

@kentcdodds kentcdodds left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good idea. Thanks!

@kentcdodds
kentcdodds merged commit 62f671d into all-contributors:master Jun 25, 2018
@kentcdodds

Copy link
Copy Markdown
Member

Would you like to add yourself to the contributors table?

@chinesedfan

Copy link
Copy Markdown
Contributor Author

@kentcdodds I am already there, but forget to add code type this time. Never mind, I will send more PRs with myself as a coder.

schalkneethling referenced this pull request in mdn/interactive-examples Jun 25, 2018
This Pull Request updates dependency [all-contributors-cli](https://github.com/jfmengels/all-contributors-cli) from `v5.2.0` to `v5.2.1`



<details>
<summary>Release Notes</summary>

### [`v5.2.1`](https://github.com/jfmengels/all-contributors-cli/releases/v5.2.1)
[Compare Source](all-contributors/cli@v5.2.0...v5.2.1)
##### Bug Fixes

* output error messages if git commands failed ([#&#8203;102](`https://github.com/jfmengels/all-contributors-cli/issues/102`)) ([62f671d](all-contributors/cli@62f671d))

---

</details>




---

This PR has been generated by [Renovate Bot](https://renovatebot.com).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Receiving some errors on Windows.

3 participants