diff --git a/NEWS.md b/NEWS.md index 60d79d4..bd0d62a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ # rtoot 0.3.4.9000 * fixed #153 by allowing POSIXct as `max_id`, `min_id` and `since_id` (#154) by @Kudusch +# fixed #158 for VSCode and similar editors which return TRUE for `rstudio::isAvailable()` (#159) # rtoot 0.3.4 diff --git a/R/utils.R b/R/utils.R index 575397a..dabb06d 100644 --- a/R/utils.R +++ b/R/utils.R @@ -230,7 +230,7 @@ rtoot_ask <- function(prompt = "enter authorization code: ", pass = TRUE, check_ } passFun <- readline if (isTRUE(pass) && isTRUE(check_rstudio) && (requireNamespace("rstudioapi", quietly = TRUE))) { - if (rstudioapi::isAvailable()) { + if (rstudioapi::isAvailable() && rstudioapi::hasFun("askForPassword")) { passFun <- rstudioapi::askForPassword } }