diff --git a/lib/config/file.js b/lib/config/file.js index b103f6a9de720a7e9ba28e1130829c7da0e64288..56c608effc216944050fd2225924cc1f9289817f 100644 --- a/lib/config/file.js +++ b/lib/config/file.js @@ -1,13 +1,13 @@ const logger = require('winston'); +const path = require('path'); module.exports = { getConfig, - isPathAbsolute, }; function getConfig(env) { let configFile = env.RENOVATE_CONFIG_FILE || 'config'; - if (!isPathAbsolute(configFile)) { + if (!path.isAbsolute(configFile)) { configFile = `../../${configFile}`; } let config = {}; @@ -20,7 +20,3 @@ function getConfig(env) { } return config; } - -function isPathAbsolute(path) { - return /^(?:\/|[a-z]+:\/\/)/.test(path); -}