Last active
May 18, 2022 14:31
-
-
Save josherrickson/17c9edbd5d4f820d65455ba4ff46e6d0 to your computer and use it in GitHub Desktop.
a more sane `devtools:::yesno`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
suppressMessages(require(devtools)) | |
yesno <- function(...) { | |
cat(paste0(..., collapse = "")) | |
# For whatever reason, devtools:::yesno returns `TRUE` if you select a No | |
# option, and `FALSE` if you select a Yes option | |
utils::menu(c("Yes", "No")) != 1 | |
} | |
utils::assignInNamespace("yesno", yesno, "devtools") | |
# remove stand-alone `yesno` | |
rm(yesno) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Insert this into your .Rprofile to overwrite
devtools:::yesno
.