Skip to content

Commit 6ff4f46

Browse files
committed
avoid env-specific characters with grep
1 parent 0f816e3 commit 6ff4f46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/targets/score_targets.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ score_forecasts <- function(latest_data, forecasts, target) {
9191
select(-location)
9292
},
9393
error = function(e) {
94-
if (rlang::cnd_message(e) == "\033[1m\033[22m\033[33m!\033[39m After removing rows with NA values in the data, no forecasts are left.") {
94+
if (grepl("no forecasts", rlang::cnd_message(e))) {
9595
return(tibble())
9696
} else {
9797
e

0 commit comments

Comments
 (0)