[BUG] pacote.extract errors out for the wrong reason
Closed this issue · 1 comments
jdmarshall commented
What / Why
If you give pacote a URL that is not a tarball, it complains that the destination directory does not contain a package.json file.
This is not the error that happened.
When
- always
Where
- n/a
How
Current Behavior
throws:
{
"errno": -2,
"code": "ENOENT",
"syscall": "open",
"path": "/tmp/foo/bar/package.json"
}
Steps to Reproduce
try { let example = await pacote.extract("http://www.example.com", "/tmp/foo/bar", {}); } catch (err) { console.log(err); }
Expected Behavior
How about "unable to extract http://www.example.com"?
Who
- n/a
References
- n/a
jdmarshall commented
Using old pacote version inadvertently.