Skip to content

Commit

Permalink
feat: allow string paths in package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
flugg committed Apr 6, 2022
1 parent a6f04b7 commit 4a4f623
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 4a4f623

Please sign in to comment.