From 6ef6446022240261374aabcee7d67e29fb92ce16 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Tue, 26 Nov 2019 17:47:21 +0000 Subject: [PATCH] fix(npm cache): now correctly setting it when preparing npm --- ts/manager.nodejs/index.ts | 1 - ts/manager.npm/index.ts | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ts/manager.nodejs/index.ts b/ts/manager.nodejs/index.ts index 08016dd..1b5183b 100644 --- a/ts/manager.nodejs/index.ts +++ b/ts/manager.nodejs/index.ts @@ -62,7 +62,6 @@ export class NpmciNodeJsManager { await bash('npm install -g npm'); await bash('node -v'); await bash('npm -v'); - await bash(`npm config set cache ${paths.NpmciCacheDir} --global `); // lets look for further config const config = await this.npmciRef.npmciConfig.getConfig(); diff --git a/ts/manager.npm/index.ts b/ts/manager.npm/index.ts index d46d7e9..5bc9b7a 100644 --- a/ts/manager.npm/index.ts +++ b/ts/manager.npm/index.ts @@ -1,4 +1,5 @@ import * as plugins from './mod.plugins'; +import * as paths from '../npmci.paths'; import { logger } from '../npmci.logging'; import { bash, bashNoError, nvmAvailable } from '../npmci.bash'; @@ -73,6 +74,10 @@ export class NpmciNpmManager { // lets save it to disk plugins.smartfile.memory.toFsSync(npmrcFileString, '/root/.npmrc'); + + // lets set the cache directory + await bash(`npm config set cache ${paths.NpmciCacheDir} --global `); + return; }