Handle build failures correctly.