mitchelloharawild / icons

R package to easily insert web icons to RMarkdown
https://pkg.mitchelloharawild.com/icons
313 stars 43 forks source link

Signal to user to run `download_fontawesome(version = "dev")` #67

Closed ddsjoberg closed 1 year ago

ddsjoberg commented 2 years ago

Hello! Thank you for making these cute icons easily available to us!

I recently got a new computer, and was running some old scripts that use the icons pkg. I kept seeing an error from icons::fontawesome("twitter") that there was a subscript out of bounds. The solution was to first run download_fontawesome(version = "dev"), but I was pretty confused for quite a while before remembering about this step.

I think it would be helpful if there was some error messaging reminding users this may be the solution. Perhaps something like this?

icons::fontawesome("twitter")
#> Error: Subscript out of bounds
#> Have you run `download_fontawesome(version = "dev")` already?

Thanks again!

PS I am on Windows 10 if that matters

ddsjoberg commented 1 year ago

Awesome, thank you!

mitchelloharawild commented 1 year ago

Thanks for your suggestion! Definitely a more helpful error (and better code practices) was needed here :rocket: