From f8e21775e1073d7a777c314b2ce8625f00b46c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= Date: Tue, 20 Feb 2024 09:33:14 +0100 Subject: [PATCH] Fix pak_sitrep() on R-devel `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. --- R/pak-sitrep.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/pak-sitrep.R b/R/pak-sitrep.R index 841d268cd..d9ef3f4c5 100644 --- a/R/pak-sitrep.R +++ b/R/pak-sitrep.R @@ -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))