docs: def raise_on_failure(mainfunc):
      """raise if and only if mainfunc fails"""
      try:
          errors = mainfunc()
          if errors:
              exit(errors)
      except CalledProcessError as error:
          exit(error.returncode)
      except SystemExit as error:
          if error.code:
              raise
      except KeyboardInterrupt:  # I don't plan to test-cover this.  :pragma:nocover:
          exit(1)