fix(npm cache): now correctly setting it when preparing npm

This commit is contained in:
Philipp Kunz 2019-11-26 17:47:21 +00:00
parent ef7d85e7c4
commit 6ef6446022
2 changed files with 5 additions and 1 deletions

View File

@ -62,7 +62,6 @@ export class NpmciNodeJsManager {
await bash('npm install -g npm'); await bash('npm install -g npm');
await bash('node -v'); await bash('node -v');
await bash('npm -v'); await bash('npm -v');
await bash(`npm config set cache ${paths.NpmciCacheDir} --global `);
// lets look for further config // lets look for further config
const config = await this.npmciRef.npmciConfig.getConfig(); const config = await this.npmciRef.npmciConfig.getConfig();

View File

@ -1,4 +1,5 @@
import * as plugins from './mod.plugins'; import * as plugins from './mod.plugins';
import * as paths from '../npmci.paths';
import { logger } from '../npmci.logging'; import { logger } from '../npmci.logging';
import { bash, bashNoError, nvmAvailable } from '../npmci.bash'; import { bash, bashNoError, nvmAvailable } from '../npmci.bash';
@ -73,6 +74,10 @@ export class NpmciNpmManager {
// lets save it to disk // lets save it to disk
plugins.smartfile.memory.toFsSync(npmrcFileString, '/root/.npmrc'); plugins.smartfile.memory.toFsSync(npmrcFileString, '/root/.npmrc');
// lets set the cache directory
await bash(`npm config set cache ${paths.NpmciCacheDir} --global `);
return; return;
} }