Don't pass config path through to cosmiconfig (#2547)

This commit is contained in:
Lucas Azzola authored and GitHub committed 2017-07-27 21:59:57 +10:00
1 parent 675688c814
commit 3eed1933e1
4 files changed
+16 -22

No files matched your search

+6 -2
View File
@@ -108,8 +108,12 @@ if (argv["find-config-path"] && filepatterns.length) {
}
function getOptionsForFile(filePath) {
return resolver
.resolveConfig(filePath, { configFile: argv["config"] })
const optionsPromise =
argv["config"] === false
? Promise.resolve(null)
: resolver.resolveConfig(filePath);
return optionsPromise
.then(options => {
const parsedArgs = minimist(args, {
boolean: booleanOptionNames,