Skip to content

Commit fb5225f

Browse files
author
Ilya Radchenko
committed
Fix caching of bower dir with a subDir
1 parent b7987ab commit fb5225f

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

lib/install-packages.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function installPackages(config, context, projectDir, bowerDirectory, done) {
1414
return runBower('install', context, projectDir, done);
1515
}
1616

17-
// hash the package.json
17+
// hash the bower.json
1818
bowerHash(projectDir, function (err, hash) {
1919
if (err) {
2020
return done(err);

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 bowerHash = require('./bower-hash');
66

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

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

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

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

worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ module.exports = {
4444
return done(err);
4545
}
4646

47-
updateCache(context, bowerDirectory, done);
47+
updateCache(context, projectDir, bowerDirectory, done);
4848
});
4949
});
5050
}

0 commit comments

Comments
 (0)