Skip to content

Commit d83ed8e

Browse files
Install globals first
Allows users to replace npm before running npm install
1 parent c6d8f4f commit d83ed8e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

worker.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,6 @@ module.exports = {
4242
var tasks = [];
4343
var nocache = config.caching !== 'strict' && config.caching !== 'loose';
4444

45-
tasks.push(function (next) {
46-
installPackages(config, context, function (err, exact) {
47-
if (err || exact === true || nocache) {
48-
return next(err);
49-
}
50-
51-
updateCache(context, projectDir, next);
52-
});
53-
});
54-
5545
if (installGlobalPackages) {
5646
tasks.push(function (next) {
5747
installGlobals(config, context, globalsDir, function (err, cached) {
@@ -64,6 +54,16 @@ module.exports = {
6454
});
6555
}
6656

57+
tasks.push(function (next) {
58+
installPackages(config, context, function (err, exact) {
59+
if (err || exact === true || nocache) {
60+
return next(err);
61+
}
62+
63+
updateCache(context, projectDir, next);
64+
});
65+
});
66+
6767
async.series(tasks, done);
6868
}
6969
};

0 commit comments

Comments
 (0)