Hey there.
Thanks for reporting this. My understanding of how exit codes work (worked?) is a bit different. See this post:
In any case, if you’re using the latest scanner versions (correct me if that isn’t the case) the change in behavior you’re seeing is probably the result of JRE auto-provisioning. Basically, the scanner itself provisions another JVM, which probably emits the correct exit code but isn’t transferred to the parent process.
Just a theory at this point. Can you try disabling JRE auto-provisioning (sonar.scanner.skipJreProvisioning=true to see if it goes back to the old behavior?