mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 06:56:24 +00:00
552b5e68c5
* Move yarn and npm helpers into branch worker * Fix name * Move package-json helper * Update name * Move changelog * Move github-app * Remove unused platform * Move logger * Fix lint
22 lines
512 B
JavaScript
22 lines
512 B
JavaScript
const logger = require('../logger');
|
|
const path = require('path');
|
|
|
|
module.exports = {
|
|
getConfig,
|
|
};
|
|
|
|
function getConfig(env) {
|
|
let configFile = env.RENOVATE_CONFIG_FILE || 'config';
|
|
if (!path.isAbsolute(configFile)) {
|
|
configFile = `../../${configFile}`;
|
|
}
|
|
let config = {};
|
|
try {
|
|
// eslint-disable-next-line global-require,import/no-dynamic-require
|
|
config = require(configFile);
|
|
} catch (err) {
|
|
// Do nothing
|
|
logger.debug('Could not locate config file');
|
|
}
|
|
return config;
|
|
}
|