Skip to content

Commit

Permalink
Merge pull request #74 from flugg/feature/config-path
Browse files Browse the repository at this point in the history
Allow string paths to configuration in package.json
  • Loading branch information
toplenboren committed May 28, 2022
2 parents a6f04b7 + 4a4f623 commit d65a692
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion simple-git-hooks.js
Expand Up @@ -290,7 +290,8 @@ function _getConfig(projectRootPath, configFileName='') {
*/
function _getConfigFromPackageJson(projectRootPath = process.cwd()) {
const {packageJsonContent} = _getPackageJson(projectRootPath)
return packageJsonContent['simple-git-hooks']
const config = packageJsonContent['simple-git-hooks'];
return typeof config === 'string' ? _getConfig(config) : packageJsonContent['simple-git-hooks']
}

/**
Expand Down

0 comments on commit d65a692

Please sign in to comment.