Skip to content

Commit 920b5f6

Browse files
committed
Ensure jupyter config dir exist
1 parent 74801f4 commit 920b5f6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

jupyter_server/auth/security.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ def persist_config(config_file=None, mode=0o600):
143143
if config_file is None:
144144
config_file = os.path.join(jupyter_config_dir(), 'jupyter_server_config.json')
145145

146+
os.makedirs(os.path.dirname(config_file), exist_ok=True)
147+
146148
loader = JSONFileConfigLoader(os.path.basename(config_file), os.path.dirname(config_file))
147149
try:
148150
config = loader.load_config()

0 commit comments

Comments
 (0)