Skip to content

Commit e535a96

Browse files
Copilothuangyiirene
andcommitted
Add error handling to merge driver command
Co-authored-by: huangyiirene <[email protected]>
1 parent 5fe2bba commit e535a96

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ jobs:
3636
# Configure custom merge driver for pnpm-lock.yaml
3737
git config merge.pnpm-merge.name "pnpm-lock.yaml merge driver"
3838
git config merge.pnpm-merge.driver \
39-
"pnpm install --no-frozen-lockfile && cp pnpm-lock.yaml %A"
39+
"pnpm install --no-frozen-lockfile && \
40+
test -f pnpm-lock.yaml && cp pnpm-lock.yaml %A || exit 1"
4041
4142
# Apply merge driver (CI-only, doesn't affect repository)
4243
echo "pnpm-lock.yaml merge=pnpm-merge" >> .git/info/attributes

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ jobs:
2626
# Configure custom merge driver for pnpm-lock.yaml
2727
git config merge.pnpm-merge.name "pnpm-lock.yaml merge driver"
2828
git config merge.pnpm-merge.driver \
29-
"pnpm install --no-frozen-lockfile && cp pnpm-lock.yaml %A"
29+
"pnpm install --no-frozen-lockfile && \
30+
test -f pnpm-lock.yaml && cp pnpm-lock.yaml %A || exit 1"
3031
3132
# Apply merge driver (CI-only, doesn't affect repository)
3233
echo "pnpm-lock.yaml merge=pnpm-merge" >> .git/info/attributes

.github/workflows/test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ jobs:
2424
# Configure custom merge driver for pnpm-lock.yaml
2525
git config merge.pnpm-merge.name "pnpm-lock.yaml merge driver"
2626
git config merge.pnpm-merge.driver \
27-
"pnpm install --no-frozen-lockfile && cp pnpm-lock.yaml %A"
27+
"pnpm install --no-frozen-lockfile && \
28+
test -f pnpm-lock.yaml && cp pnpm-lock.yaml %A || exit 1"
2829
2930
# Apply merge driver (CI-only, doesn't affect repository)
3031
echo "pnpm-lock.yaml merge=pnpm-merge" >> .git/info/attributes

0 commit comments

Comments
 (0)