Skip to content

Commit 1f1eb8a

Browse files
authored
Merge pull request #22928 from keithc-ca/ebcdic
Accept all three possible codes for EBCDIC newlines
2 parents c4dc654 + 47f81aa commit 1f1eb8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

buildenv/jenkins/jobs/infrastructure/lineEndingsCheck.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ timeout(time: 6, unit: 'HOURS') {
113113
BAD_FILES << "${it}"
114114
break
115115
case ~/.*EBCDIC text.*/:
116-
// Check for line end at EOF, which, in EBCDIC, may be (octal) 0045 or 0205:
116+
// Check for line end at EOF, which, in EBCDIC, may be (octal) 0025, 0045, or 0205:
117117
// Map them to LF so wc will recognize them.
118118
NEWLINES = sh (
119-
script: "tail -c1 '${it}' | tr '\045\205' '\n' | wc -l",
119+
script: "tail -c1 '${it}' | tr '\025\045\205' '\n' | wc -l",
120120
returnStdout: true
121121
).trim()
122122
if (NEWLINES == "1") {

0 commit comments

Comments
 (0)