Skip to content

Commit d6c95cb

Browse files
committed
bugfix: configuration directory doesn't exist
1 parent 1736637 commit d6c95cb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/shelloracle/configure.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from prompt_toolkit.formatted_text import FormattedText
1313
from prompt_toolkit.shortcuts import confirm
1414

15-
from .config import Configuration
15+
from .config import Configuration, data_home
1616
from .providers import Provider, Setting, list_providers, get_provider
1717

1818

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

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

0 commit comments

Comments
 (0)