Update Task.cs

Fixed problem with "Error" section in log being created regardless
This commit is contained in:
sgetaz 2015-08-18 18:42:44 +02:00
parent 1c710704fb
commit e1db7d192f

View file

@ -10,13 +10,15 @@ namespace Cosmos.Build.Installer {
public void Run() {
var exceptions = DoRun();
Log.NewSection("Error");
//Collect all the exceptions from the build stage, and list them
foreach(var msg in exceptions)
{
Log.WriteLine(msg);
if (exceptions.Count > 0) {
Log.NewSection("Error");
//Collect all the exceptions from the build stage, and list them
foreach(var msg in exceptions) {
Log.WriteLine(msg);
}
Log.SetError();
}
Log.SetError();
}
public bool AmRunning32Bit() {
@ -167,4 +169,4 @@ namespace Cosmos.Build.Installer {
mLog.WriteLine(aText);
}
}
}
}