Make HM exit with a status code 0 if successful

[fixes #50045123]