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

Added hoardr mkdir() call to make sure cache path exists for ghcnd_stations() call #350

Merged
merged 1 commit into from
May 15, 2020

Conversation

mpettis
Copy link

@mpettis mpettis commented May 14, 2020

Fix ghcnd_stations() error.

Description

This fixes the problem where a new ghcnd_stations() call cannot write a local dump of the stations data in the hoardr cache. I added a single line before the GET call to write the data locally to create the cache directory if it doesn't exist, according to what I read about hoardr. The call now works.

I am unsure if this is the appropriate place to place the mkdir() cache creation call, but it is a place that will work for the limited scope call of ghcnd_stations().

Related Issue

Fix #349

@sckott sckott added this to the v0.9.7 milestone May 15, 2020
@sckott sckott added the ghcnd label May 15, 2020
@sckott
Copy link
Contributor

sckott commented May 15, 2020

thanks, LGTM

looks like we need to add that line to get_inventory as well - i'll do that after merging

@sckott sckott merged commit bea7c9a into ropensci:master May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ghcnd_stations() not finding file it expects (ghcnd-stations.txt)
2 participants