Skip to content

Commit

Permalink
Fix pak_sitrep() on R-devel
Browse files Browse the repository at this point in the history
`ver[1,4]` returns `package_version` for
a `package_version` object, and then we
cannot use `ver[1,4] > 9000` because it
cannot convert `9000` into a `package_version`
to do the comparison.

Also, it probably should be 9000 instead of
90000, that must have been a typo.
  • Loading branch information
gaborcsardi committed Feb 20, 2024
1 parent 7c052e5 commit f8e2177
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/pak-sitrep.R
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ get_ver <- function(path) {
}
dsc <- read.dcf(desc)
ver <- package_version(dsc[, "Version"])
devver <- ver[1, 4]
if (!is.na(devver) && devver >= 90000) {
devver <- as.numeric(ver[1, 4])
if (!is.na(devver) && devver >= 9000) {
if ("RemoteSha" %in% colnames(dsc)) {
sha <- dsc[, "RemoteSha"]
return(c(ver, sha))
Expand Down

0 comments on commit f8e2177

Please sign in to comment.