dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 9 years ago
parent 858a0745c7
commit c8ea3e6c31
  1. 5
      BuildServer/lib/tasks/dotnetbuilderwrapper.js
  2. 2
      DotNetBuilder/Program.cs
  3. 4
      DotNetBuilder/Response.cs

@ -28,6 +28,11 @@ module.exports = function (params, processor) {
var report = JSON.parse(result); var report = JSON.parse(result);
var messages = report.Messages; var messages = report.Messages;
for (var i = 0; i < messages.length; i++) { for (var i = 0; i < messages.length; i++) {
if (!messages[i]) {
processor.onError("Message is null");
continue;
}
switch(messages[i].Type) { switch(messages[i].Type) {
case "info": case "info":
processor.onInfo(messages[i].Body); processor.onInfo(messages[i].Body);

@ -30,7 +30,7 @@ namespace MicroBuildServer.DotNetBuilder
} }
catch (Exception e) catch (Exception e)
{ {
return new Response { Messages = new[] { new Response.Message { Type = "error", Body = e.ToString() } } }; return new Response { Messages = new[] { Response.Message.CreateError(e.ToString()) } };
} }
} }

@ -11,8 +11,8 @@ namespace MicroBuildServer.DotNetBuilder
[Serializable] [Serializable]
public class Message public class Message
{ {
public string Type { get; set; } public string Type { get; private set; }
public string Body { get; set; } public string Body { get; private set; }
public static Message CreateInfo(string body) public static Message CreateInfo(string body)
{ {

Loading…
Cancel
Save