Skip to content

Commit aab16ce

Browse files
authored
git config --unset exits with code 5 when the key is missing (#694)
1 parent ff7bbee commit aab16ce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ jobs:
2424
- name: Unset header
2525
# checkout@v2 adds a header that makes branch protection report errors
2626
# because the Github action bot is not a collaborator on the repo
27-
run: git config --local --unset http.https://github.com/.extraheader
27+
run: |
28+
if git config --local --get-all http.https://github.com/.extraheader > /dev/null; then
29+
git config --local --unset-all http.https://github.com/.extraheader
30+
fi
2831
2932
- name: Set up Python
3033
uses: actions/setup-python@v6

0 commit comments

Comments
 (0)