Skip to content

Commit d64eae2

Browse files
authored
Create .cortex dir if not present (#1909)
1 parent a14be01 commit d64eae2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/cortex/client/cortex/telemetry.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def _create_default_scope(optional_tags: dict = {}) -> sentry_sdk.Scope:
8383
user_id = None
8484
client_id_file_path = pathlib.Path.home() / ".cortex" / "client-id.txt"
8585
if not client_id_file_path.is_file():
86+
client_id_file_path.parent.mkdir(parents=True, exist_ok=True)
8687
client_id_file_path.write_text(str(uuid4()))
8788
user_id = client_id_file_path.read_text()
8889

0 commit comments

Comments
 (0)