Skip to content

Commit

Permalink
Update Task.cs
Browse files Browse the repository at this point in the history
Fixed problem with "Error" section in log being created regardless
  • Loading branch information
sgetaz committed Aug 18, 2015
1 parent 1c71070 commit e1db7d1
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions source/Cosmos.Build.Installer/Task.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ public abstract class Task {

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() {
Expand Down Expand Up @@ -167,4 +169,4 @@ public void Echo(string aText) {
mLog.WriteLine(aText);
}
}
}
}

0 comments on commit e1db7d1

Please sign in to comment.