From b705f3979a65922c64ec9565ad65ee3c1539609a Mon Sep 17 00:00:00 2001 From: streakingman Date: Fri, 25 Mar 2022 21:55:38 +0800 Subject: [PATCH] =?UTF-8?q?fix(set-project):=20=E5=88=87=E6=8D=A2=20husky?= =?UTF-8?q?=20set=20=E5=91=BD=E4=BB=A4=E9=98=B2=E6=AD=A2=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- actions/set-project.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actions/set-project.js b/actions/set-project.js index 0acbb5c..70725f9 100644 --- a/actions/set-project.js +++ b/actions/set-project.js @@ -89,9 +89,9 @@ const setProject = async () => { // husky安装与钩子配置 execSync('npx husky install'); execSync('npm set-script prepare "husky install"'); - execSync('npx husky add .husky/pre-commit "npx lint-staged"'); + execSync('npx husky set .husky/pre-commit "npx lint-staged"'); execSync( - 'npx husky add .husky/commit-msg "npx --no-install commitlint --edit $1"' + 'npx husky set .husky/commit-msg "npx --no-install commitlint --edit $1"' ); fileGenerator({ templateName: 'commitlint' }); fileGenerator({ templateName: 'lintstaged' });