Skip to content

Commit 788e118

Browse files
authored
Fix workspace export without arguments (#236)
1 parent d0f1d66 commit 788e118

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

jupyterlab_server/workspaces_app.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
from .config import LabConfig
1111
from .workspaces_handler import WorkspacesManager
1212

13+
# Default workspace ID
14+
# Needs to match PageConfig.defaultWorkspace define in packages/coreutils/src/pageconfig.ts
15+
DEFAULT_WORKSPACE = "default"
16+
1317

1418
class WorkspaceListApp(JupyterApp, LabConfig):
1519
version = __version__
@@ -84,7 +88,7 @@ def start(self):
8488
print("Too many arguments were provided for workspace export.")
8589
self.exit(1)
8690

87-
raw = self.extra_args[0]
91+
raw = DEFAULT_WORKSPACE if not self.extra_args else self.extra_args[0]
8892
try:
8993
workspace = self.manager.load(raw)
9094
print(json.dumps(workspace))

0 commit comments

Comments
 (0)