Skip to content

Commit 6cec8d9

Browse files
committed
chore: 🤖 check lockfile
1 parent d4d21b5 commit 6cec8d9

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lefthook.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,8 @@ post-merge:
4848
commands:
4949
check-pnpm-lock:
5050
run: |
51-
PRE=1
52-
if git diff --quiet HEAD@{$PRE} -- pnpm-lock.yaml; then
53-
echo pnpm-lock.yaml 已变更,运行 pnpm install ...
54-
pnpm install
51+
if git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD | grep pnpm-lock.yaml; then
52+
echo pnpm-lock.yaml 已变更,请运行 pnpm install 以保持依赖一致
5553
fi
5654
5755
post-checkout:
@@ -61,7 +59,6 @@ post-checkout:
6159
run: |
6260
if [ {3} -eq 1 ]; then
6361
if git diff --quiet {1} {2} -- pnpm-lock.yaml; then
64-
echo pnpm-lock.yaml 已变更,运行 pnpm install ...
65-
pnpm install
62+
echo pnpm-lock.yaml 已变更,请运行 pnpm install 以保持依赖一致
6663
fi
6764
fi

0 commit comments

Comments
 (0)