Skip to content

Commit

Permalink
Update dev install.R, simpler syntax for dev, rc versions
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi authored Nov 13, 2024
1 parent 72f91c6 commit 49beb69
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions dev/install.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,20 @@
}

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, ".")

install.packages("pak", repos = sprintf(
Expand Down

0 comments on commit 49beb69

Please sign in to comment.