renovate/lib/manager/bundler/utils.ts
2020-05-20 16:08:07 +02:00

14 lines
433 B
TypeScript

import { join } from 'upath';
import { logger } from '../../logger';
import { ensureDir } from '../../util/fs';
import { UpdateArtifactsConfig } from '../common';
export async function getGemHome(
config: UpdateArtifactsConfig
): Promise<string> {
const cacheDir =
process.env.GEM_HOME || join(config.cacheDir, './others/gem');
await ensureDir(cacheDir);
logger.debug(`Using gem home ${cacheDir}`);
return cacheDir;
}