提交 cd3b7f74 编写于 作者: J Jared Parsons

Fix the package script

The error operations need to distinguish between adding errors to the
known list and printing them out to the console. This avoids an
exception foreaching over the error list at the end of the script
(previously it was adding them while iterating).
上级 514ab614
......@@ -191,7 +191,11 @@ var errors = new List<string>();
void ReportError(string message)
{
errors.Add(message);
PrintError(message);
}
void PrintError(string message)
{
var color = Console.ForegroundColor;
Console.ForegroundColor = ConsoleColor.Red;
Console.Error.WriteLine(message);
......@@ -392,7 +396,7 @@ catch
foreach (var error in errors)
{
ReportError(error);
PrintError(error);
}
Environment.Exit(exit);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册