Skip to content

Commit

Permalink
fix: cache option behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi committed Dec 14, 2017
1 parent 3ccd864 commit 3b088d0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/writeFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,13 @@ export default function writeFile(globalRef, pattern, file) {
return cacache
.get(globalRef.cacheDir, cacheKey)
.then(
(result) => JSON.parse(result.data),
(result) => result.data,
() => {
return Promise
.resolve()
.then(() => transform(content, file.absoluteFrom))
.then((content) => cacache.put(
globalRef.cacheDir,
cacheKey,
JSON.stringify(content)
).then(() => content));
.then((content) => cacache.put(globalRef.cacheDir, cacheKey, content.toString())
.then(() => content));
}
);
}
Expand Down

0 comments on commit 3b088d0

Please sign in to comment.