[FIXED JENKINS-18367] Use non-zero return code when list-jobs CLI fails

Already discussed here: https://github.com/jenkinsci/jenkins/pull/793#discussion_r4713733