Skip to content

Commit 61ba7a7

Browse files
dgkfjimhester
authored andcommitted
adding safeguard against missing libpaths when recording tests
1 parent 99d45a3 commit 61ba7a7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

R/trace_tests.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,10 @@ update_current_test <- function() {
190190

191191
has_srcfile <- viapply(syscall_srcfile, length) > 0L
192192
srcfile_tmp <- logical(length(has_srcfile))
193-
srcfile_tmp[has_srcfile] <- startsWith(syscall_srcfile[has_srcfile], normalizePath(.libPaths()[[1]]))
193+
srcfile_tmp[has_srcfile] <- startsWith(
194+
syscall_srcfile[has_srcfile],
195+
normalizePath(.libPaths()[[1]], mustWork = FALSE)
196+
)
194197

195198
test_frames <- if (any(srcfile_tmp)) {
196199
# if possible, try to take any frames within the temporary library

0 commit comments

Comments
 (0)