Skip to content

Commit 3e6b331

Browse files
committed
chore: 🤖 post-merge
1 parent 6ed8967 commit 3e6b331

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lefthook.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ post-merge:
4848
commands:
4949
check-pnpm-lock:
5050
run: |
51-
if git diff --quiet HEAD^ HEAD -- pnpm-lock.yaml; then
52-
echo pnpm-lock.yaml 已更新,运行 pnpm install ...
51+
PRE=1
52+
if git diff --quiet HEAD@{$PRE} -- pnpm-lock.yaml; then
53+
echo pnpm-lock.yaml 已变更,运行 pnpm install ...
5354
pnpm install
5455
fi
5556
@@ -60,7 +61,7 @@ post-checkout:
6061
run: |
6162
if [ {3} -eq 1 ]; then
6263
if git diff --quiet {1} {2} -- pnpm-lock.yaml; then
63-
echo pnpm-lock.yaml 已更新,运行 pnpm install ...
64+
echo pnpm-lock.yaml 已变更,运行 pnpm install ...
6465
pnpm install
6566
fi
6667
fi

0 commit comments

Comments
 (0)