Open ghost opened 3 years ago
Thanks for the bug report. As a workaround, you can force these to be set as scalars with the I()
function; e.g.
rstudioapi::writeRStudioPreference(
name = "cran_mirror",
value = list(
name = I("Global (CDN)"),
host = I("RStudio"),
url = I("https://cran.rstudio.com/"),
repos = I(""),
country = I("us")
)
)
Thanks! The I()
workaround doesn't seem to do the trick for me. Running the above code results in the same JSON. I also got crazy and tried a few permutations like applying I
to the whole list object.
rstudioapi 0.13 RStudio 1.4.1103 R 4.0.4
When using
writeRStudioPreference
to setcran_mirror
, all scalar values are encoded as lists in the underlyingrstudio-prefs.json
, which RStudio doesn't seem to like.For example, running
produces this entry
rstudio-prefs.json
:RStudio, immediately produces a warning:
When the value includes an entry for a
secondary
repository, RStudio's preferences pane can no longer be opened.