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

Fix config directory creation failure #82

Merged
merged 1 commit into from
Mar 12, 2023
Merged

Fix config directory creation failure #82

merged 1 commit into from
Mar 12, 2023

Conversation

brandondong
Copy link
Contributor

@brandondong brandondong commented Mar 12, 2023

Fixes #81. C:\Users\<user>\AppData\Roaming\weathercrab\ won't exist on first run so creating the config directory will fail.

File/folder creation/writes can legitimately fail due to file system issues (e.g. permissions) so I converted those calls to return Result's instead of panic.

@ttytm
Copy link
Owner

ttytm commented Mar 12, 2023

Awesome, thanks for helping out!

Absolutely, just unwrapping that directory creation is a bit too rambo here.

@github-actions
Copy link

Test Results

  3 files  ±0    3 suites  ±0   4s ⏱️ -1s
  9 tests ±0    9 ✔️ ±0  0 💤 ±0  0 ±0 
27 runs  ±0  27 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit e743c59. ± Comparison against base commit 85b34e6.

@ttytm ttytm merged commit 809223c into ttytm:main Mar 12, 2023
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.

Panic on first run
2 participants