Skip to content

Commit 6b5d9df

Browse files
authored
fix: init create dir before (#1348)
1 parent ba89eff commit 6b5d9df

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ if (a == 'init') {
1111
d.scripts.prepare = 'husky'
1212
w('package.json', JSON.stringify(d, null, /\t/.test() ? '\t' : 2) + '\n')
1313
process.stdout.write(i())
14+
try { f.mkdirSync('.husky') } catch {}
1415
w('.husky/pre-commit', process.env.npm_config_user_agent.split('/')[0] + ' test\n')
1516
process.exit()
1617
}

0 commit comments

Comments
 (0)