Skip to content

Commit

Permalink
bugfix: configuration directory doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
djcopley committed Apr 27, 2024
1 parent 1736637 commit d6c95cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/shelloracle/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from prompt_toolkit.formatted_text import FormattedText
from prompt_toolkit.shortcuts import confirm

from .config import Configuration
from .config import Configuration, data_home
from .providers import Provider, Setting, list_providers, get_provider


Expand Down Expand Up @@ -118,6 +118,7 @@ def write_shelloracle_config(provider: type[Provider], settings: dict[str, Any])
provider_configuration_table.add(setting, value)
provider_table.add(provider.name, provider_configuration_table)

data_home.mkdir(exist_ok=True)
with Configuration.filepath.open("w") as config_file:
tomlkit.dump(config, config_file)

Expand Down

0 comments on commit d6c95cb

Please sign in to comment.