Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: output error messages if git commands failed #102

Merged
merged 1 commit into from
Jun 25, 2018

Conversation

chinesedfan
Copy link
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

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.

Copy link
Collaborator

@kentcdodds kentcdodds left a comment

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
Collaborator

Would you like to add yourself to the contributors table?

@chinesedfan
Copy link
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 pushed a commit to mdn/interactive-examples that referenced this pull request 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](`all-contributors/cli#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