Skip to content

Commit

Permalink
fix util_prompt_check() - noninteractive usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ericrobskyhuntley committed Aug 5, 2024
1 parent fdc8171 commit 21150b9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,11 @@ util_run_which_tables <- function(routines, push_remote) {

util_prompt_check <- function(prompt) {
util_log_message(prompt)
r <- readline()
if (interactive()) {
r <- readline()
} else {
r <- readLines("stdin",n=1);
}
if (r %in% c("Y", "y", "N", "n")) {
check <- TRUE
} else {
Expand Down

0 comments on commit 21150b9

Please sign in to comment.