devops: switch to LF line-endings in Git for text files (#10292)
Co-authored-by: Max Schmitt <max@schmitt.mx>
This commit is contained in:
parent
1c9c0dc2e6
commit
fd3ec50cf6
4
.gitattributes
vendored
4
.gitattributes
vendored
|
|
@ -1,3 +1,3 @@
|
||||||
# text files must be lf for golden file tests to work
|
# text files must be lf for golden file tests to work
|
||||||
*.txt eol=lf
|
* text=auto eol=lf
|
||||||
*.json eol=lf
|
|
||||||
|
|
|
||||||
|
|
@ -294,8 +294,6 @@ validator_ts.push(`
|
||||||
let hasChanges = false;
|
let hasChanges = false;
|
||||||
|
|
||||||
function writeFile(filePath, content) {
|
function writeFile(filePath, content) {
|
||||||
if (os.platform() === 'win32')
|
|
||||||
content = content.replace(/\r\n/g, '\n').replace(/\n/g, '\r\n');
|
|
||||||
const existing = fs.readFileSync(filePath, 'utf8');
|
const existing = fs.readFileSync(filePath, 'utf8');
|
||||||
if (existing === content)
|
if (existing === content)
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue