validate that line endings are LF on build

if running on git it will now fail if the file contains CRLF line endings and tell the user to run a local build to fix it.
This commit is contained in:
LotP1 2024-12-28 02:00:24 +01:00
parent 43f6e4a873
commit 4e56b1493f
2 changed files with 5 additions and 1 deletions

View File

@ -37,6 +37,10 @@ namespace Ryujinx.BuildValidationTasks
bool isGitRunner = path.Contains("runner") || path.Contains("D:\\a\\Ryujinx\\Ryujinx");
if (isGitRunner)
Console.WriteLine("Is Git Runner!");
if (isGitRunner && data.Contains("\r\n"))
throw new FormatException("locales.json is using CRLF line endings! It should be using LF line endings, build locally to fix...");
bool encounteredIssue = false;
for (int i = 0; i < json.Locales.Count; i++)

View File

@ -22598,4 +22598,4 @@
}
}
]
}
}