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

rethrow git pathspec errors from git operations on hosted services #84

Merged
merged 1 commit into from Jul 2, 2021

Conversation

lukekarrys
Copy link
Member

@lukekarrys lukekarrys commented Jul 2, 2021

This rethrows git pathspec errors early since there is no point in retrying them.

In _resolvedFromHosted the benefit is that resolving doesn't need to be attempted again.

In _cloneHosted prior to this change, retrying a missing pathspec would change the error to something like fatal: destination path '/Users/lukekarrys/.npm/_cacache/tmp/git-clone-e421e02b/.git' already exists and is not an empty directory. which was obscuring the actual error.

With this change, this is what the error looks like in the cli:

Old
Screen Shot 2021-07-02 at 12 37 22 PM

New
Screen Shot 2021-07-02 at 12 15 33 PM

Ref: npm/cli#3149

@lukekarrys lukekarrys changed the title rethrow git pathspec errors when cloning from a hosted service rethrow git pathspec errors from git operations on hosted services Jul 2, 2021
@lukekarrys lukekarrys requested a review from a team July 2, 2021 19:29
@lukekarrys lukekarrys merged commit e7e6f0d into latest Jul 2, 2021
@lukekarrys lukekarrys deleted the lk/handle-pathspec-error branch July 2, 2021 20:43
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.

None yet

2 participants