From 2033052fd0851ac9033c2449c18296292e97101b Mon Sep 17 00:00:00 2001 From: typicode Date: Thu, 25 Jan 2024 14:53:47 +0100 Subject: [PATCH] fix: init create dir before --- bin.js | 1 + 1 file changed, 1 insertion(+) diff --git a/bin.js b/bin.js index b352c2257..5c54f50ec 100755 --- a/bin.js +++ b/bin.js @@ -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() }