Skip to content

Commit

Permalink
Fix required data type for preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
GegznaV committed Aug 26, 2023
1 parent 129ebe2 commit 71131ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/settings--preferences.R
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,10 @@ rstudio_set_preferences <- function(file) {
rstudioapi::writeRStudioPreference(.x, as.integer(.y))
} else if (stringr::str_detect(e_msg, "expected <Real>")) {
rstudioapi::writeRStudioPreference(.x, as.numeric(.y))
} else if (stringr::str_detect(e_msg, "expected <Array>")) {
rstudioapi::writeRStudioPreference(.x, as.list(.y))
} else {
print(glue::glue("'In {.x}' = {.y}\n{e}:\n"))
print(glue::glue("'In {.x}' = {.y}\n{e}\n"))
}
}
)
Expand Down

0 comments on commit 71131ab

Please sign in to comment.