Skip to content

Commit

Permalink
fix: init create dir before (#1348)
Browse files Browse the repository at this point in the history
  • Loading branch information
typicode committed Jan 25, 2024
1 parent ba89eff commit 6b5d9df
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bin.js
Expand Up @@ -11,6 +11,7 @@ if (a == 'init') {
d.scripts.prepare = 'husky'
w('package.json', JSON.stringify(d, null, /\t/.test() ? '\t' : 2) + '\n')
process.stdout.write(i())
try { f.mkdirSync('.husky') } catch {}
w('.husky/pre-commit', process.env.npm_config_user_agent.split('/')[0] + ' test\n')
process.exit()
}
Expand Down

0 comments on commit 6b5d9df

Please sign in to comment.