Skip to content

Commit

Permalink
Merge pull request #50 from MichaelChirico/patch-1
Browse files Browse the repository at this point in the history
Replace '::' instead of ':'
  • Loading branch information
tdhock authored May 4, 2024
2 parents e9d661d + 4395cc5 commit 03c68e0
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 03c68e0

Please sign in to comment.