Skip to content

Commit

Permalink
refactor: baseDir to global config
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Feb 5, 2021
1 parent 88f5414 commit d203def
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/config/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export interface RenovateSharedConfig {
export interface GlobalAdminConfig {
autodiscover?: boolean;
autodiscoverFilter?: string;
baseDir?: string;
forceCli?: boolean;
gitPrivateKey?: string;
logFile?: string;
Expand All @@ -92,7 +93,6 @@ export interface RepoAdminConfig {
}

export interface RenovateAdminConfig {
baseDir?: string;
cacheDir?: string;

customEnvVariables?: Record<string, string>;
Expand Down
2 changes: 1 addition & 1 deletion lib/config/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ const options: RenovateOptions[] = [
name: 'baseDir',
description:
'The base directory for Renovate to store local files, including repository files and cache. If left empty, Renovate will create its own temporary directory to use.',
admin: true,
stage: 'global',
type: 'string',
},
{
Expand Down
6 changes: 3 additions & 3 deletions lib/workers/global/initialize.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import os from 'os';
import fs from 'fs-extra';
import upath from 'upath';
import { RenovateConfig } from '../../config/common';
import { GlobalConfig, RenovateConfig } from '../../config/common';
import { logger } from '../../logger';
import { initPlatform } from '../../platform';
import * as packageCache from '../../util/cache/package';
import { setEmojiConfig } from '../../util/emoji';
import { Limit, setMaxLimit } from './limits';

async function setDirectories(input: RenovateConfig): Promise<RenovateConfig> {
const config: RenovateConfig = { ...input };
async function setDirectories(input: GlobalConfig): Promise<GlobalConfig> {
const config: GlobalConfig = { ...input };
process.env.TMPDIR = process.env.RENOVATE_TMPDIR || os.tmpdir();
if (config.baseDir) {
logger.debug('Using configured baseDir: ' + config.baseDir);
Expand Down

0 comments on commit d203def

Please sign in to comment.