File tree 1 file changed +11
-11
lines changed
1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change 4
4
# We check both in rust-lang/rust and in a submodule to make sure both are
5
5
# accurate. Submodules are checked out significantly later than the main
6
6
# repository in this script, so settings can (and do!) change between then.
7
- #
8
- # Linux (and maybe macOS) builders don't currently have dos2unix so just only
9
- # run this step on Windows.
10
7
11
8
set -euo pipefail
12
9
IFS=$' \n\t '
13
10
14
11
source " $( cd " $( dirname " $0 " ) " && pwd) /../shared.sh"
15
12
16
- if isWindows; then
17
- # print out the git configuration so we can better investigate failures in
18
- # the following
19
- git config --list --show-origin
20
- dos2unix -ih Cargo.lock src/tools/rust-installer/install-template.sh
21
- endings=$( dos2unix -ic Cargo.lock src/tools/rust-installer/install-template.sh)
22
- # if endings has non-zero length, error out
23
- if [ -n " $endings " ]; then exit 1 ; fi
13
+ # print out the git configuration so we can better investigate failures in
14
+ # the following
15
+ git config --list --show-origin
16
+ # -U is necessary on Windows to stop grep automatically converting the line ending
17
+ endings=$( grep -Ul $( printf ' \r$' ) Cargo.lock src/tools/cargo/Cargo.lock) || true
18
+ # if endings has non-zero length, error out
19
+ if [[ -n $endings ]]; then
20
+ echo " Error: found DOS line endings"
21
+ # Print the files with DOS line endings
22
+ echo " $endings "
23
+ exit 1
24
24
fi
You can’t perform that action at this time.
0 commit comments