diff --git a/index.js b/index.js index 71e4caa9b..66932771b 100644 --- a/index.js +++ b/index.js @@ -10,7 +10,7 @@ export default (d = '.husky') => { if (!f.existsSync('.git')) return `.git can't be found` let _ = (x = '') => p.join(d, '_', x) - let { status: s, stderr: e } = c.spawnSync('git', ['config', 'core.hooksPath', _()]) + let { status: s, stderr: e } = c.spawnSync('git', ['config', 'core.hooksPath', `${d}/_`]) if (s == null) return 'git command not found' if (s) return '' + e @@ -20,4 +20,4 @@ export default (d = '.husky') => { l.forEach(h => w(_(h), `#!/usr/bin/env sh\n. "\${0%/*}/h"`, { mode: 0o755 })) w(_('husky.sh'), '') return '' -} \ No newline at end of file +}