Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

Commit

Permalink
fix(finalize): don't try to cache manifests we can't get a good key for
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Apr 12, 2017
1 parent b139d4b commit 8ab1758
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/finalize-manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ function finalizeManifest (pkg, spec, opts) {
? new Manifest(pkg, props)
: new Manifest(props)
}).then(manifest => {
if (!opts.cache) {
const cacheKey = key || finalKey(manifest, spec)
if (!opts.cache || !cacheKey) {
return manifest
} else {
opts.metadata = {
Expand All @@ -58,7 +59,7 @@ function finalizeManifest (pkg, spec, opts) {
type: 'finalized-manifest'
}
return cache.put(
opts.cache, key || finalKey(manifest, spec), '.', opts
opts.cache, cacheKey, '.', opts
).then(() => manifest)
}
})
Expand Down

0 comments on commit 8ab1758

Please sign in to comment.