Skip to content

Commit

Permalink
jest-runtime: expose inner error when it fails to write cache (#3373)
Browse files Browse the repository at this point in the history
* 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 005ac8c commit dfcc4b2
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 dfcc4b2

Please sign in to comment.