Skip to content

Commit

Permalink
jest-runtime: expose inner error when it fails to write cache (jestjs…
Browse files Browse the repository at this point in the history
…#3373)

* jest-runtime: expose inner error when it fails to write cache

* Update transform.js
  • Loading branch information
jeanlauliac authored and cpojer committed Apr 26, 2017
1 parent 02879c4 commit 98711f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/jest-runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jest-runtime",
"version": "19.0.2",
"version": "19.0.3",
"repository": {
"type": "git",
"url": "https://github.com/facebook/jest.git"
Expand Down
3 changes: 2 additions & 1 deletion packages/jest-runtime/src/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ const writeCacheFile = (cachePath: Path, fileData: string) => {
try {
fs.writeFileSync(cachePath, fileData, 'utf8');
} catch (e) {
e.message = 'jest: failed to cache transform results in: ' + cachePath;
e.message = 'jest: failed to cache transform results in: ' + cachePath +
'\nFailure message: ' + e.message;
removeFile(cachePath);
throw e;
}
Expand Down

0 comments on commit 98711f0

Please sign in to comment.