From 4e56b1493fd453500e13ed919cc8d122f7326f46 Mon Sep 17 00:00:00 2001 From: LotP1 <68976644+LotP1@users.noreply.github.com> Date: Sat, 28 Dec 2024 02:00:24 +0100 Subject: [PATCH] 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. --- src/Ryujinx.BuildValidationTasks/LocalesValidationTask.cs | 4 ++++ src/Ryujinx/Assets/locales.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Ryujinx.BuildValidationTasks/LocalesValidationTask.cs b/src/Ryujinx.BuildValidationTasks/LocalesValidationTask.cs index 52b90bd33..3c9e5925f 100644 --- a/src/Ryujinx.BuildValidationTasks/LocalesValidationTask.cs +++ b/src/Ryujinx.BuildValidationTasks/LocalesValidationTask.cs @@ -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++) diff --git a/src/Ryujinx/Assets/locales.json b/src/Ryujinx/Assets/locales.json index 9d2abbfbe..5dc387730 100644 --- a/src/Ryujinx/Assets/locales.json +++ b/src/Ryujinx/Assets/locales.json @@ -22598,4 +22598,4 @@ } } ] -} +} \ No newline at end of file