Skip to content

Commit 7220154

Browse files
Always npm install in docker runner
1 parent be15934 commit 7220154

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/install-packages.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@ var packageHash = require('./package-hash');
55
var npmCommand = require('./npm-command');
66

77
function installPackages(config, context, done) {
8+
var dataDir = context.dataDir;
9+
var projectDir = path.join(dataDir, config.subdir || '');
10+
11+
// We don't support any caching in a docker container, as the container is reconstructed on every run anyway.
12+
if (context.runnerId === 'docker') {
13+
return runNpm('install', context, projectDir, done);
14+
}
15+
816
var update = config.update_cache;
917
var cachier = context.cachier('modules');
10-
var dataDir = context.dataDir;
1118
var policy = config.caching;
12-
var projectDir = path.join(dataDir, config.subdir || '');
1319

1420
if (policy !== 'strict' && policy !== 'loose') {
1521
return runNpm('install', context, projectDir, done);

0 commit comments

Comments
 (0)