diff options
author | Rebecca Turner <me@re-becca.org> | 2015-10-21 03:55:58 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2015-10-22 01:21:45 +0300 |
commit | 5ee1491c13053370948ba972fd02e91c541a428a (patch) | |
tree | 77c85efbc38bc22c850703db9c6cdf5f658cd0b7 /lib | |
parent | eb28a8c30d6191dc470b3fda1cba367c48e9377e (diff) |
fetch-package-metadata: close, what, I don't even
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fetch-package-metadata.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/fetch-package-metadata.js b/lib/fetch-package-metadata.js index 336de7ef7..103ed2fc6 100644 --- a/lib/fetch-package-metadata.js +++ b/lib/fetch-package-metadata.js @@ -283,7 +283,8 @@ function untarStream (tarball, cb) { } else if (hasTarHeader(c)) { doUntar() } else { - file.close() + if (file.close) file.close() + if (file.destroy) file.destroy() var er = new Error('Non-gzip/tarball ' + tarball) er.code = 'ENOTTARBALL' return cb(er) |