mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-15 14:03:02 +00:00
better error when proxy command isn't found
This commit is contained in:
@@ -732,7 +732,15 @@ class JupyterHub(Application):
|
|||||||
cmd.extend(['--ssl-cert', self.ssl_cert])
|
cmd.extend(['--ssl-cert', self.ssl_cert])
|
||||||
self.log.info("Starting proxy @ %s", self.proxy.public_server.url)
|
self.log.info("Starting proxy @ %s", self.proxy.public_server.url)
|
||||||
self.log.debug("Proxy cmd: %s", cmd)
|
self.log.debug("Proxy cmd: %s", cmd)
|
||||||
self.proxy_process = Popen(cmd, env=env)
|
try:
|
||||||
|
self.proxy_process = Popen(cmd, env=env)
|
||||||
|
except FileNotFoundError as e:
|
||||||
|
self.log.error(
|
||||||
|
"Failed to find proxy %r\n"
|
||||||
|
"The proxy can be installed with `npm install -g configurable-http-proxy`"
|
||||||
|
% self.proxy_cmd
|
||||||
|
)
|
||||||
|
self.exit(1)
|
||||||
def _check():
|
def _check():
|
||||||
status = self.proxy_process.poll()
|
status = self.proxy_process.poll()
|
||||||
if status is not None:
|
if status is not None:
|
||||||
|
Reference in New Issue
Block a user