Objective 🎯
Store user credentials consistently
User stories 📇
If a user is using renv, the .Renviron file should be created to the project directory, or append credentials to existing .Renviron. Expecting the environmental variable HOME is not consistent across platforms or business computer systems.
Issue pops up when Sys.getenv("HOME") responds with "C:\Users\${USERNAME}". It also makes more sense to use the .Renviron in a R project home directory using here::here() instead.
Tasks ⚙️
Development 👨💻
I suggest using here::here() instead of Sys.getent("HOME"). See https://github.com/arthur-shaw/susoapi/blob/f878729a77fc472bd3547a91ae35cc358f7a0128/R/authenticate.R#L21C5-L21C36.
Objective 🎯
Store user credentials consistently
User stories 📇
If a user is using renv, the .Renviron file should be created to the project directory, or append credentials to existing .Renviron. Expecting the environmental variable
HOMEis not consistent across platforms or business computer systems.Issue pops up when
Sys.getenv("HOME")responds with "C:\Users\${USERNAME}". It also makes more sense to use the .Renviron in a R project home directory usinghere::here()instead.Tasks ⚙️
Development 👨💻
I suggest using
here::here()instead ofSys.getent("HOME"). See https://github.com/arthur-shaw/susoapi/blob/f878729a77fc472bd3547a91ae35cc358f7a0128/R/authenticate.R#L21C5-L21C36.