Skip to content

Commit e4388a1

Browse files
committed
Add a clickable link to path when warning.
1 parent 6832a8e commit e4388a1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

R/io.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ transform_utf8_one <- function(path, fun, dry) {
5454
if (inherits(e, "dryError")) {
5555
rlang::abort(conditionMessage(e))
5656
}
57-
warn(paste0("When processing ", path, ": ", conditionMessage(e)))
57+
show_path <- cli::style_hyperlink(
58+
cli::col_blue(basename(path)),
59+
paste0("file://", path)
60+
)
61+
cli::cli_warn("When processing {show_path}:", parent = e)
5862
NA
5963
}
6064
)

0 commit comments

Comments
 (0)