Skip to content
Snippets Groups Projects
Commit e77d596f authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix(cache): default init using tmpdir

parent 5e0ac8c1
No related branches found
No related tags found
No related merge requests found
...@@ -8,10 +8,6 @@ const { getConfig } = require('../dist/config/file'); ...@@ -8,10 +8,6 @@ const { getConfig } = require('../dist/config/file');
const cache = require('../dist/workers/global/cache'); const cache = require('../dist/workers/global/cache');
const { configFileNames } = require('../dist/config/app-strings'); const { configFileNames } = require('../dist/config/app-strings');
// istanbul ignore if
if (!global.renovateCache) {
cache.init(os.tmpdir());
}
/* eslint-disable no-console */ /* eslint-disable no-console */
let returnVal = 0; let returnVal = 0;
......
import os from 'os';
import * as cacache from 'cacache'; import * as cacache from 'cacache';
import path from 'path'; import path from 'path';
import { DateTime } from 'luxon'; import { DateTime } from 'luxon';
...@@ -58,3 +59,5 @@ export function init(cacheDir: string): void { ...@@ -58,3 +59,5 @@ export function init(cacheDir: string): void {
logger.debug('Initializing Renovate internal cache into ' + renovateCache); logger.debug('Initializing Renovate internal cache into ' + renovateCache);
global.renovateCache = global.renovateCache || { get, set, rm, rmAll }; global.renovateCache = global.renovateCache || { get, set, rm, rmAll };
} }
init(os.tmpdir()); // Use default temporary dir to begin with
...@@ -57,7 +57,6 @@ export async function getRepositoryConfig( ...@@ -57,7 +57,6 @@ export async function getRepositoryConfig(
export async function start(): Promise<0 | 1> { export async function start(): Promise<0 | 1> {
try { try {
cache.init(os.tmpdir());
let config = await configParser.parseConfigs(process.env, process.argv); let config = await configParser.parseConfigs(process.env, process.argv);
config = await initPlatform(config); config = await initPlatform(config);
config = await setDirectories(config); config = await setDirectories(config);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment