Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create .rai if necessary #147

Merged
merged 1 commit into from Mar 2, 2024
Merged

create .rai if necessary #147

merged 1 commit into from Mar 2, 2024

Conversation

sswatson
Copy link
Contributor

@sswatson sswatson commented Mar 1, 2024

It used to be the case that the SDK could write to ~/.rai/tokens.json no problem because that folder already had to exist for the config setup to work. But now that that folder may be missing, you can end up getting warnings all over the place in code that depends on the SDK (for example, PyRel).

This fix simply checks whether the directory exists before writing the cache and creates it if necessary.

Copy link
Contributor

@joshuafcole joshuafcole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sswatson sswatson merged commit 724a67e into main Mar 2, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants