Add non-zero exit code to CLI for startup errors. (#553)

* Add non-zero exit code to CLI for startup errors.
* Add missing attribute to mock server.

Fixes #552.
This commit is contained in:
Carlton Gibson 2025-05-15 09:23:22 +02:00 committed by GitHub
parent b8b4d2a5f7
commit 7cb7253150
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -289,3 +289,5 @@ class CommandLineInterface:
server_name=args.server_name,
)
self.server.run()
if self.server.abort_start:
exit(1)

View File

@ -81,6 +81,8 @@ class TestCLIInterface(TestCase):
Mock server object for testing.
"""
abort_start = False
def __init__(self, **kwargs):
self.init_kwargs = kwargs