jupyterhub / sudospawner

Spawn JupyterHub single-user servers with sudo
BSD 3-Clause "New" or "Revised" License
50 stars 41 forks source link

Can't set sudo_args using CLI #71

Open CreatureDev opened 3 years ago

CreatureDev commented 3 years ago

Bug description

When trying to launch a jupyterhub server using sudospawner, I am attempting to pass a -E argument to sudo in order to preserve the environment When I do this it only returns that --SudoSpawner.sudo_args argument is of type 'str' when it needs to be a list No matter how I edit this argument, it always evaluates to a string, making this option useless

Expected behaviour

the passed argument using --SudoSpawner.sudo_args argument for jupyterhub should result in the passed string being appended to the sudo args list, instead of parsed as a list itself

Actual behaviour

Passed value is used as a list, causing an error

How to reproduce

jupyterhub --JupyterHub.spawner_class=sudospawner.SudoSpawner --SudoSpawner.sudo_args=-E jupyterhub --JupyterHub.spawner_class=sudospawner.SudoSpawner --SudoSpawner.sudo_args=[-E] jupyterhub --JupyterHub.spawner_class=sudospawner.SudoSpawner --SudoSpawner.sudo_args=\"[-E]\"

Your personal set up

# paste output of `pip freeze` or `conda list` here

# jupyterhub_config.py