Skip to content

Exceptions in IPostprocessBuildWithReport don't fail the build / Regression #733

@mastef

Description

@mastef

Bug description

In game-ci/unity-builder@v3 exceptions thrown in buildsteps with the IPostprocessBuildWithReport interface would halt the build with an error. Now they are being ignored and the action is marked with a success message.

How to reproduce

internal sealed class PostBuild : IPostprocessBuildWithReport
{
  public int callbackOrder => 9999;

  public void OnPostprocessBuild(BuildReport report)
  {
    throw new Exception($"Build should fail here");
  }
}

Expected behavior

Build should fail every time with a failure state.

Additional details

This was working in game-ci/unity-builder@v3, but after upgrading to game-ci/unity-builder@v4 it doesn't stop the build and it is marked as successful.

Workaround: Spamming EditorApplication.Exit(1); everywhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions