Skip to content

Commit e092114

Browse files
committed
Platform-independent output on md5sums generation
1 parent cf93aeb commit e092114

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

.gitattributes

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ devenv/answer_files/**/*.xml -text
1414
pkg/collector/corechecks/containers/kubelet/testdata/summary.json -text
1515
releasenotes/notes/*.yaml -text
1616
tasks/unit_tests/testdata/secret.tar.gz/*.xml -text
17-
# The test that uses this file needs adjustment to not rely on autocrlf
18-
bazel/tools/tar_checksums/testdata/expected_checksums.txt -eol
1917

2018
# Set batch file line endings to CRLF so that they can be executed on Windows
2119
*.bat text eol=crlf

bazel/tools/tar_checksums/generate_md5sum.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ def _open_tar(path):
3939

4040

4141
def generate_md5sums(tar_path, output_path):
42-
with open(output_path, 'w') as out:
42+
# newline = '\n' prevents automatic translation to '\r\n' on Windows
43+
with open(output_path, 'w', newline='\n') as out:
4344
with _open_tar(tar_path) as tf:
4445
for member in tf:
4546
if not member.isfile():

0 commit comments

Comments
 (0)