in Build/Tools.cs [136:173]
public static void Exit()
{
if (!Tools.UnderTeamCity)
{
var foregroundColor = Console.ForegroundColor;
try
{
Console.ForegroundColor = ConsoleColor.Yellow;
var timeout = TimeSpan.FromSeconds(10);
var period = TimeSpan.FromMilliseconds(10);
while (timeout > period)
{
if (Console.KeyAvailable)
{
if (Console.ReadKey(true).Key == ConsoleKey.Y)
{
return;
}
else
{
break;
}
}
Thread.Sleep(period);
timeout -= period;
Console.SetCursorPosition(0, Console.CursorTop);
Console.Write($"Continue this build? {(int)timeout.TotalSeconds:00} y/n");
}
}
finally
{
Console.ForegroundColor = foregroundColor;
}
}
Environment.Exit(1);
}