From ede69ab4d2e727a1164075051663c7705d699ebf Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Fri, 19 Apr 2024 19:03:15 -0700 Subject: [PATCH] Correct bug for mb_access_token(install=FALSE) As it stands, this will just set the environment variable `type`, not `MAPBOX_PUBLIC_TOKEN` (e.g.). --- R/accounts.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/accounts.R b/R/accounts.R index 3fe8862..f64f563 100644 --- a/R/accounts.R +++ b/R/accounts.R @@ -66,7 +66,7 @@ mb_access_token <- function(token, overwrite = FALSE, install = FALSE) { return(token) } else { message("To install your access token for use in future sessions, run this function with `install = TRUE`.") - Sys.setenv(type = token) + do.call(Sys.setenv, stats::setNames(list(token), type)) } }