Skip to content

Commit d65a692

Browse files
authored
Merge pull request #74 from flugg/feature/config-path
Allow string paths to configuration in package.json
2 parents a6f04b7 + 4a4f623 commit d65a692

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

simple-git-hooks.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,8 @@ function _getConfig(projectRootPath, configFileName='') {
290290
*/
291291
function _getConfigFromPackageJson(projectRootPath = process.cwd()) {
292292
const {packageJsonContent} = _getPackageJson(projectRootPath)
293-
return packageJsonContent['simple-git-hooks']
293+
const config = packageJsonContent['simple-git-hooks'];
294+
return typeof config === 'string' ? _getConfig(config) : packageJsonContent['simple-git-hooks']
294295
}
295296

296297
/**

0 commit comments

Comments
 (0)