Skip to content

Commit 7beb9af

Browse files
committed
fix(hooks): replace manual git add with stage_fixed to prevent index.lock conflicts
1 parent 8eb7ad6 commit 7beb9af

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

lefthook.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ pre-commit:
1313
jobs:
1414
- name: trailing-whitespace
1515
glob: "*.{go,yml,yaml,json,md,mod,sum}"
16-
run: >
17-
sed -i '' 's/[[:space:]]*$//' {staged_files} &&
18-
git add {staged_files}
16+
stage_fixed: true
17+
run: sed -i '' 's/[[:space:]]*$//' {staged_files}
1918

2019
- name: gitleaks
2120
run: gitleaks protect --staged --no-banner

0 commit comments

Comments
 (0)