From 892e5977ed43d2583b12c3fdfba4d5deb4fefea9 Mon Sep 17 00:00:00 2001 From: lanrtop Date: Sat, 4 Jul 2026 16:50:55 +0900 Subject: [PATCH] =?UTF-8?q?fix(onboarding):=20lefthook.yml.tmpl=20?= =?UTF-8?q?=E7=94=A8=20COMMIT=5FEDITMSG=20=E6=9B=BF=E6=8D=A2=20{1}?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit lefthook v2 在 Windows 上解析 YAML 时会将 {1} 与模板变量混淆, 改为直接读取 .git/COMMIT_EDITMSG,与 react-phone-apps 修复保持一致。 --- src-tauri/resources/onboarding/lefthook.yml.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/resources/onboarding/lefthook.yml.tmpl b/src-tauri/resources/onboarding/lefthook.yml.tmpl index 276bbad..d7569a3 100644 --- a/src-tauri/resources/onboarding/lefthook.yml.tmpl +++ b/src-tauri/resources/onboarding/lefthook.yml.tmpl @@ -13,4 +13,4 @@ pre-commit: commit-msg: commands: conventional: - run: "head -1 \"{1}\" | grep -qE '^(feat|fix|docs|chore|refactor|ci|perf|style|test|build|revert)(\\(.+\\))?!?: .+' || exit 1" + run: "head -1 .git/COMMIT_EDITMSG | grep -qE '^(feat|fix|docs|chore|refactor|ci|perf|style|test|build|revert)(\\(.+\\))?!?: .+' || exit 1"