gadenbuie / rsthemes

🔮 Full RStudio IDE and Syntax Themes
https://www.garrickadenbuie.com/project/rsthemes/
Other
604 stars 45 forks source link

Notify users if suncalc is not installed #38

Closed pat-s closed 4 years ago

pat-s commented 4 years ago

Due to {suncalc} being in Suggests, it is currently silently ignored if missing and hence location based functionality will not work if.

This just happened to me on a new machine. This might cause headaches to users since nothing is happening but also no error is thrown.

I added a small message to tell the user what to do.

gadenbuie commented 4 years ago

Thanks for the info! There was a check with a stop() but my guess is that it gets swallowed when the function is run as an RStudio hook.

I moved things around a bit because there's also the possibility that no lat/lon was provided and ipapi isn't installed to attempt geolocation.