Preserve literal carriage returns with dos2unix

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Devin DooleyandCopilot App committed 2026-11-13 16:36:46 -08:00
1 parent 4b3bc35bc8
commit 5686bb8cb6
1 file changed
+9 -3
+9 -3
View File
@@ -27,6 +27,11 @@ jobs:
- name: Install formatting tools - name: Install formatting tools
run: python -m pip install pre-commit-hooks==6.0.0 run: python -m pip install pre-commit-hooks==6.0.0
- name: Install dos2unix
run: |
sudo apt-get update
sudo apt-get install --yes dos2unix
- name: Check all gitignore files recursively - name: Check all gitignore files recursively
shell: bash shell: bash
run: | run: |
@@ -41,13 +46,14 @@ jobs:
echo "Checking ${#files[@]} gitignore files." echo "Checking ${#files[@]} gitignore files."
status=0 status=0
mixed-line-ending --fix=lf -- "${files[@]}" || status=1 dos2unix --keep-bom -- "${files[@]}" || status=1
trailing-whitespace-fixer -- "${files[@]}" || status=1 trailing-whitespace-fixer -- "${files[@]}" || status=1
end-of-file-fixer -- "${files[@]}" || status=1 end-of-file-fixer -- "${files[@]}" || status=1
git --no-pager diff --no-ext-diff --exit-code -- "${files[@]}" || status=1
if (( status != 0 )); then if (( status != 0 )); then
echo "::error::Formatting checks failed. See tool output and diff below." echo "::error::Formatting checks failed. See tool output and diff above."
git --no-pager diff --no-ext-diff -- "${files[@]}"
fi fi
exit "$status" exit "$status"