Skip to content

Commit cb38691

Browse files
committed
Fix current_r_platform*() on Linux
That I just broke.
1 parent b6cbdec commit cb38691

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

R/platform-linux.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ current_r_platform_data_linux <- function(raw, etc = "/etc") {
1010
error = function(e) NULL
1111
)
1212

13-
cbind(raw, parse_linux_platform_info(os, rh))
13+
cbind(
14+
raw[, setdiff(names(raw), c("distribution", "release")), drop = FALSE],
15+
parse_linux_platform_info(os, rh)
16+
)
1417
}
1518

1619
unknown_dist <- function() {

tests/testthat/_snaps/platform.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,19 @@
5959
Error in `get_package_dirs_for_platform()`:
6060
! pkgcache does not support packages for R versions before R 3.2
6161

62+
---
63+
64+
Code
65+
get_all_package_dirs("windows", "2.15.0")
66+
Condition
67+
Error in `FUN()`:
68+
! pkgcache does not support packages for R versions before R 3.2
69+
Code
70+
get_all_package_dirs("macos", "3.1.3")
71+
Condition
72+
Error in `FUN()`:
73+
! pkgcache does not support packages for R versions before R 3.2
74+
6275
# current_r_platform_data_linux
6376

6477
Code

0 commit comments

Comments
 (0)