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.
There is no check around
pacote.extract
inRegistory.ts
.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.