Skip to content

Commit cbdd540

Browse files
committed
ensure we respect explicit singleuser.cmd: null
1 parent 40272b1 commit cbdd540

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

jupyterhub/files/hub/jupyterhub_config.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,13 @@ def camelCaseify(s):
408408

409409
c.JupyterHub.load_roles.append(role)
410410

411+
# respect explicit null command (distinct from unspecified)
412+
# this avoids relying on KubeSpawner.cmd's default being None
413+
_unspecified = object()
414+
specified_cmd = get_config("singleuser.cmd", _unspecified)
415+
if specified_cmd is not _unspecified:
416+
c.Spawner.cmd = specified_cmd
411417

412-
set_config_if_not_none(c.Spawner, "cmd", "singleuser.cmd")
413418
set_config_if_not_none(c.Spawner, "default_url", "singleuser.defaultUrl")
414419

415420
cloud_metadata = get_config("singleuser.cloudMetadata", {})

0 commit comments

Comments
 (0)