diff options
Diffstat (limited to 'node_modules/yargs/lib/apply-extends.js')
-rw-r--r-- | node_modules/yargs/lib/apply-extends.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/node_modules/yargs/lib/apply-extends.js b/node_modules/yargs/lib/apply-extends.js index 3005848e3..1436b6508 100644 --- a/node_modules/yargs/lib/apply-extends.js +++ b/node_modules/yargs/lib/apply-extends.js @@ -6,9 +6,9 @@ const YError = require('./yerror') let previouslyVisitedConfigs = [] -function checkForCircularExtends (path) { - if (previouslyVisitedConfigs.indexOf(path) > -1) { - throw new YError(`Circular extended configurations: '${path}'.`) +function checkForCircularExtends (cfgPath) { + if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) { + throw new YError(`Circular extended configurations: '${cfgPath}'.`) } } @@ -21,7 +21,7 @@ function applyExtends (config, cwd) { if (config.hasOwnProperty('extends')) { if (typeof config.extends !== 'string') return defaultConfig - const isPath = /\.json$/.test(config.extends) + const isPath = /\.json|\..*rc$/.test(config.extends) let pathToDefault = null if (!isPath) { try { |