Skip to content

Commit

Permalink
Update query_src_list
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmcd18 committed May 28, 2024
1 parent 755db52 commit 13551b3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions R/query-src-list.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ query_src_list <- function(.src_list, .string) {

matches <- src_list_char[grepl(.string, src_list_char, ignore.case = TRUE)]

if (length(matches) == 0) {
stop("No matches found for ", .string)
}

hits <- dplyr::tibble()

for (df.i in names(matches)) {
Expand All @@ -53,6 +49,10 @@ query_src_list <- function(.src_list, .string) {
}
}

hits %>% dplyr::mutate(MATCHING = .string)
if (length(matches) == 0) {
cli::cli_alert_danger(paste0("No matches found for ", .string))
} else {
hits %>% dplyr::mutate(MATCHING = .string)
}

}

0 comments on commit 13551b3

Please sign in to comment.