Skip to content

Commit cc486da

Browse files
author
Ilya Radchenko
committed
Fix cache directory to take into account subdirs
1 parent a1aae0b commit cc486da

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

lib/update-cache.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@ var path = require('path');
44
var async = require('async');
55
var packageHash = require('./package-hash');
66

7-
function updateCache(context, done) {
7+
function updateCache(context, projectDir, done) {
88
var cachier = context.cachier('modules');
9-
var dataDir = context.dataDir;
109

11-
packageHash(dataDir, function (err, hash) {
10+
packageHash(projectDir, function (err, hash) {
1211
if (err) {
1312
return done(err);
1413
}
1514

16-
var dest = path.join(dataDir, 'node_modules');
15+
var dest = path.join(projectDir, 'node_modules');
1716

1817
context.comment('saved node_modules to cache');
1918

worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ module.exports = {
5353
return next(err);
5454
}
5555

56-
updateCache(context, next);
56+
updateCache(context, projectDir, next);
5757
});
5858
});
5959
}

0 commit comments

Comments
 (0)