Skip to content

Commit 4af5924

Browse files
author
ripley
committed
tweak rustc detection
git-svn-id: https://svn.r-project.org/R/trunk@87116 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 6114d41 commit 4af5924

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/library/tools/R/check.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3934,13 +3934,14 @@ add_dummies <- function(dir, Log)
39343934
lines <- readLines(InstLog, warn = FALSE)
39353935
l1 <- grep("(cargo build| Compiling )", lines)
39363936
if(!length(l1)) return(NA)
3937+
l2 <- grep(" Compiling ", lines)
39373938
checkingLog(Log, "Rust compilation")
39383939
msg <- character(); OK <- TRUE
3939-
if(any(grep("Downloading crates ...", lines))) {
3940+
if(any(grep("Downloading crates ...", lines, fixed = TRUE))) {
39403941
OK <- FALSE
39413942
msg <- c(msg, "Downloads Rust crates")
39423943
}
3943-
lines <- lines[1:l1[1L]]
3944+
lines <- if(length(l2)) lines[1:l2[1L]] else lines[1:l1[1L]]
39443945
patt <- "rustc *[[:digit:]]+[].][[:digit:]]"
39453946
ans <- any(grepl(patt, lines, ignore.case = TRUE))
39463947
if(!ans) {

0 commit comments

Comments
 (0)