Skip to content

Commit

Permalink
Replace '::' instead of ':'
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico authored May 3, 2024
1 parent e9d661d commit 4395cc5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions R/versions.R
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,12 @@ atime_versions_exprs <- function(pkg.path, expr, sha.vec=NULL, verbose=FALSE, pk
new.Package <- new.Package.vec[[commit.i]]
old.lines <- capture.output(substitute(expr))
new.lines <- gsub(
paste0(Package,":"),
paste0(new.Package,":"),
old.lines)
paste0(Package,"::"),
paste0(new.Package,"::"),
old.lines,
fixed=TRUE)
if(Package!=new.Package && identical(old.lines,new.lines)){
stop(sprintf("expr should contain at least one instance of %s: to replace with %s:", Package, new.Package))
stop(sprintf("expr should contain at least one instance of %s:: to replace with %s::", Package, new.Package))
}
a.args[[commit.name]] <- str2lang(paste(new.lines, collapse="\n"))
atime_versions_install(
Expand Down

0 comments on commit 4395cc5

Please sign in to comment.