diff options
| author | bors <bors@rust-lang.org> | 2024-05-27 20:49:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-05-27 20:49:23 +0000 |
| commit | 84b40fc908c3adc7e0e470b3fbaa264df0e122b8 (patch) | |
| tree | e629d46a9de99a1b20e97ab7d3e4eafa2206f784 /src/ci/scripts | |
| parent | f00b02e6bbe63707503f058fb87cc3e2b25991ac (diff) | |
| parent | 4966e1ae35fdc5feb908aab7845ecea3c5947340 (diff) | |
| download | rust-84b40fc908c3adc7e0e470b3fbaa264df0e122b8.tar.gz rust-84b40fc908c3adc7e0e470b3fbaa264df0e122b8.zip | |
Auto merge of #125628 - matthiaskrgr:rollup-3zk9v3w, r=matthiaskrgr
Rollup of 4 pull requests Successful merges: - #125339 (The number of tests does not depend on the architecture's pointer width) - #125542 (Migrate rustdoc verify output files) - #125616 (MIR validation: ensure that downcast projection is followed by field projection) - #125625 (Use grep to implement verify-line-endings) Failed merges: - #125573 (Migrate `run-make/allow-warnings-cmdline-stability` to `rmake.rs`) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/ci/scripts')
| -rwxr-xr-x | src/ci/scripts/verify-line-endings.sh | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ci/scripts/verify-line-endings.sh b/src/ci/scripts/verify-line-endings.sh index f3cac13ea48..5f4b4aeb0e4 100755 --- a/src/ci/scripts/verify-line-endings.sh +++ b/src/ci/scripts/verify-line-endings.sh @@ -4,21 +4,21 @@ # We check both in rust-lang/rust and in a submodule to make sure both are # accurate. Submodules are checked out significantly later than the main # repository in this script, so settings can (and do!) change between then. -# -# Linux (and maybe macOS) builders don't currently have dos2unix so just only -# run this step on Windows. set -euo pipefail IFS=$'\n\t' source "$(cd "$(dirname "$0")" && pwd)/../shared.sh" -if isWindows; then - # print out the git configuration so we can better investigate failures in - # the following - git config --list --show-origin - dos2unix -ih Cargo.lock src/tools/rust-installer/install-template.sh - endings=$(dos2unix -ic Cargo.lock src/tools/rust-installer/install-template.sh) - # if endings has non-zero length, error out - if [ -n "$endings" ]; then exit 1 ; fi +# print out the git configuration so we can better investigate failures in +# the following +git config --list --show-origin +# -U is necessary on Windows to stop grep automatically converting the line ending +endings=$(grep -Ul $(printf '\r$') Cargo.lock src/tools/cargo/Cargo.lock) || true +# if endings has non-zero length, error out +if [[ -n $endings ]]; then + echo "Error: found DOS line endings" + # Print the files with DOS line endings + echo "$endings" + exit 1 fi |
