Move file existence check and improve process output handling

This commit is contained in:
Stone_Red
2026-03-06 00:09:11 +01:00
parent 246e05dcd9
commit 1872c4fb35
3 changed files with 11 additions and 11 deletions
@@ -449,18 +449,11 @@ public class YesNtInterpreter
if (!File.Exists(path))
{
Console.WriteLine($"File \"{path}\" not found!");
return false;
}
string[] lines = File.ReadAllLines(path);
if (lines.Length <= 0)
{
Console.WriteLine($"File \"{path}\" is empty!");
return false;
}
runtimeInfo.WorkingDirectory = Path.GetDirectoryName(path);
for (int i = 0; i < lines.Length; i++)