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

Does not cope with pacote.extract failures #33

Open
jamesbattersby opened this issue Jan 1, 2021 · 1 comment
Open

Does not cope with pacote.extract failures #33

jamesbattersby opened this issue Jan 1, 2021 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@jamesbattersby
Copy link

There is no check around pacote.extract in Registory.ts.

// If we've already downloaded this package, just return it.
if (!fs.existsSync(dest)) {
      await pacote.extract(spec, dest, this.options);
}

The problem is that if pacote fails for some reason (apart from the user not knowing), the destination directory may be created which will prevent us from trying again.

I encountered this issue when the registry I was using redirected me to a mirror that wanted me to login. In this case there was an exception thrown. It would be good to report the error, and clean up the download directory in the error case.

@joelspadin-garmin joelspadin-garmin added bug Something isn't working good first issue Good for newcomers labels Jan 13, 2021
@joelspadin-garmin
Copy link
Owner

Thanks for the report. I may not have time to get to this for a while, but it looks like it shouldn't be too hard to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants