Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

Improve git error messaging #92

Open
zkat opened this issue Jun 2, 2017 · 2 comments
Open

Improve git error messaging #92

zkat opened this issue Jun 2, 2017 · 2 comments

Comments

@zkat
Copy link
Owner

zkat commented Jun 2, 2017

Right now, pacote is swallowing all stderr output from the git subprocesses.

We should really pick that up and either included in the error message, or log it to stderr.

@scotttrinh
Copy link

@zkat I'd be happy to jump in here. Not sure how Bluebird deals with the presence of all three callback arguments, but I'm sure we can either work around that, or refactor https://github.com/zkat/pacote/blob/latest/lib/util/git.js#L6-L8 to build its promise manually.

Jumping off of your two suggestions:

  1. We could say only if there was an error, include the output of stderr in the error object.
  2. We could always write non-empty stderr value to process.stderr.

Are there other places in the npm codebase that we can use to decide between these two options (or some other options?) that you know of?

@zkat
Copy link
Owner Author

zkat commented Aug 23, 2017

@scotttrinh I like the idea of passing through stderr when there's a nonzero exit code. I'd gladly take a PR and I think you'll come across a lot of concrete answers while you try it out yourself. Try linking your pacote fork into a fork of npm to see what it feels like from the user's perspective, too

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants