✅ How do I make APICompat return a non-zero status code if an issue is detected?
I have a project that depends on a Git submoduled library that is not under my control. Users of my project also use the version of the library I ship, and will often use features of it that I don't use. Whenever a new feature is added to this library, someone will invariably submit a PR to bump the commit hash of the submodule, which I would normally like to accept. However, this library can sometimes introduce breaking changes that I cannot ship without risking causing trouble for people who depend on my project.
I have found and added the
Microsoft.DotNet.ApiCompat.Tool
tool to my GitHub Actions, and it does do its job of finding API compatibility issues. However, because the default behavior (?) is to return a status code 0 even in the presence of a problem, it does not cause the action to report as failed. A brief glance of the documentation did not show a --fail-on-issue
flag.
Is there a way I can coerce this tool to output a non-zero status code or otherwise fail my action if a compatibility issue is detected?4 Replies
Hacked around it because I noticed errors get printed to
stderr
and success gets printed to stdout
. Not great, but absent someone telling me a better way to do it, it'll work for now.Use the /close command to mark a forum thread as answered
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
Use the /close command to mark a forum thread as answered