Skip to content

Commit

Permalink
Simple source() to install dev or rc version
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
gaborcsardi committed Nov 13, 2024
1 parent 0feb4ab commit 397a525
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tools/pkgdown/assets/install.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,18 @@
}

stream <- "stable"
if (!is.null(source_arg) && grepl("\\?stream=[a-z]+$", source_arg)) {
stream <- sub("^.*\\?stream=", "", source_arg)
if (!is.null(source_arg)) {
if (grepl("\\?stream=[a-z]+$", source_arg)) {
stream <- sub("^.*\\?stream=", "", source_arg)
} else if (grepl("\\?dev$", source_arg) || grepl("\\?devel$", source_arg)) {
stream <- "devel"
} else if (grepl("\\?rc$", source_arg)) {
stream <- "rc"
}
}

if (stream == "dev") {
stream <- "devel"
}

message("Installing pak from stream ", stream, ".")
Expand Down

0 comments on commit 397a525

Please sign in to comment.