mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-16 06:22:59 +00:00
Abort informatively on unrecognized CLI options
rather than ignoring them, leading to unexpected behavior
This commit is contained in:
@@ -9,6 +9,7 @@ import logging
|
||||
import os
|
||||
import re
|
||||
import secrets
|
||||
import shlex
|
||||
import signal
|
||||
import socket
|
||||
import ssl
|
||||
@@ -2840,6 +2841,10 @@ class JupyterHub(Application):
|
||||
super().initialize(*args, **kwargs)
|
||||
if self.generate_config or self.generate_certs or self.subapp:
|
||||
return
|
||||
if self.extra_args:
|
||||
self.exit(
|
||||
f"Unrecognized command-line arguments: {' '.join(shlex.quote(arg) for arg in self.extra_args)!r}"
|
||||
)
|
||||
self._start_future = asyncio.Future()
|
||||
|
||||
def record_start(f):
|
||||
|
Reference in New Issue
Block a user