Remove _all_ the trailing whitespace

Recently we tried to make the rustfmt bot remove trailing whitespace but
wrote the `sed` command incorrectly - it only removes a single
character.

Tested by running the new command on #4600.
This commit is contained in:
Tobin C. Harding 2025-06-09 00:46:17 +10:00
parent a1be2fdf73
commit 6cb4e298c8
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ jobs:
components: rustfmt
- name: Run Nightly rustfmt
# Run the formatter and manually remove trailing whitespace.
run: cargo +nightly fmt && find . -type f -name '*.rs' -exec sed -i 's/ $//' {} \;
run: cargo +nightly fmt && git ls-files -- '*.rs' -z | xargs sed -E -i'' -e 's/[[:space:]]+$//'
- name: Get the current date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Create Pull Request