File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change 44#  We check both in rust-lang/rust and in a submodule to make sure both are
55#  accurate. Submodules are checked out significantly later than the main
66#  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.
107
118set  -euo pipefail
129IFS=$' \n\t ' 
1310
1411source  " $( cd " $( dirname " $0 " ) " &&  pwd) " 
1512
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$' ) ) ||  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
2424fi 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments