summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/cacache/lib/content/write.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/cacache/lib/content/write.js')
-rw-r--r--deps/npm/node_modules/cacache/lib/content/write.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/deps/npm/node_modules/cacache/lib/content/write.js b/deps/npm/node_modules/cacache/lib/content/write.js
index c71363413c..150371cb85 100644
--- a/deps/npm/node_modules/cacache/lib/content/write.js
+++ b/deps/npm/node_modules/cacache/lib/content/write.js
@@ -36,11 +36,11 @@ function write (cache, data, opts) {
}
return BB.using(makeTmp(cache, opts), tmp => (
writeFileAsync(
- tmp.target, data, {flag: 'wx'}
+ tmp.target, data, { flag: 'wx' }
).then(() => (
moveToDestination(tmp, cache, sri, opts)
))
- )).then(() => ({integrity: sri, size: data.length}))
+ )).then(() => ({ integrity: sri, size: data.length }))
}
module.exports.stream = writeStream
@@ -111,8 +111,8 @@ function pipeToTmp (inputStream, cache, tmpTarget, opts, errCheck) {
})
errCheck()
return pipe(inputStream, hashStream, outStream).then(() => {
- return {integrity, size}
- }, err => {
+ return { integrity, size }
+ }).catch(err => {
return rimraf(tmpTarget).then(() => { throw err })
})
})