mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 23:16:26 +00:00
e212093aa9
Fixes #1182
21 lines
486 B
JavaScript
21 lines
486 B
JavaScript
const path = require('path');
|
|
|
|
module.exports = {
|
|
getConfig,
|
|
};
|
|
|
|
function getConfig(env) {
|
|
let configFile = env.RENOVATE_CONFIG_FILE || 'config';
|
|
if (!path.isAbsolute(configFile)) {
|
|
configFile = `${process.cwd()}/${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;
|
|
}
|