Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use jupyter_config_dir instead of config_path[0] for workspaces, settings #13589

Merged
merged 1 commit into from Dec 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions jupyterlab/commands.py
Expand Up @@ -26,7 +26,7 @@
from urllib.error import URLError
from urllib.request import Request, quote, urljoin, urlopen

from jupyter_core.paths import jupyter_config_path
from jupyter_core.paths import jupyter_config_dir
from jupyter_server.extension.serverextension import (
GREEN_ENABLED,
GREEN_OK,
Expand Down Expand Up @@ -139,14 +139,14 @@ def pjoin(*args):
def get_user_settings_dir():
"""Get the configured JupyterLab user settings directory."""
settings_dir = os.environ.get("JUPYTERLAB_SETTINGS_DIR")
settings_dir = settings_dir or pjoin(jupyter_config_path()[0], "lab", "user-settings")
settings_dir = settings_dir or pjoin(jupyter_config_dir(), "lab", "user-settings")
return osp.abspath(settings_dir)


def get_workspaces_dir():
"""Get the configured JupyterLab workspaces directory."""
workspaces_dir = os.environ.get("JUPYTERLAB_WORKSPACES_DIR")
workspaces_dir = workspaces_dir or pjoin(jupyter_config_path()[0], "lab", "workspaces")
workspaces_dir = workspaces_dir or pjoin(jupyter_config_dir(), "lab", "workspaces")
return osp.abspath(workspaces_dir)


Expand Down