Skip to content

Commit

Permalink
Merge pull request jupyter-server#454 from afshin/config-dir
Browse files Browse the repository at this point in the history
Ensure jupyter config dir exist
  • Loading branch information
blink1073 authored Mar 23, 2021
2 parents 8abbe20 + dc845c3 commit 097ceed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jupyter_server/auth/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ def persist_config(config_file=None, mode=0o600):
if config_file is None:
config_file = os.path.join(jupyter_config_dir(), 'jupyter_server_config.json')

os.makedirs(os.path.dirname(config_file), exist_ok=True)

loader = JSONFileConfigLoader(os.path.basename(config_file), os.path.dirname(config_file))
try:
config = loader.load_config()
Expand Down

0 comments on commit 097ceed

Please sign in to comment.