Skip to content

Commit

Permalink
feat(config): change config look up order (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
suevalov authored Mar 25, 2019
1 parent 8dd0c19 commit 9088ff3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ let configPath
export async function getConfigPath () {
const contentfulrc = '.contentfulrc.json'
const defaultPath = resolve(homedir(), contentfulrc)
if (!configPath) {
const nestedConfigPath = await findUp(contentfulrc)
configPath = nestedConfigPath || defaultPath
}
const nestedConfigPath = await findUp(contentfulrc)
configPath = nestedConfigPath || defaultPath
return configPath
}

Expand Down

0 comments on commit 9088ff3

Please sign in to comment.