Skip to content

Commit 4c7d00b

Browse files
committed
Skip user_info if no universe is set
1 parent 8a85fc9 commit 4c7d00b

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

R/buildtools.R

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -591,14 +591,16 @@ universe_name_fallback <- function(){
591591

592592
universe_info <- function(){
593593
name <- Sys.getenv('UNIVERSE_NAME', universe_name_fallback())
594-
universe <- switch(name,
595-
'bioc' = 'bioconductor',
596-
'bioc-release' = 'bioconductor',
597-
'r-multiverse-staging' = 'r-multiverse',
598-
'ropensci-champions' = 'ropensci',
599-
name
600-
)
601-
gh::gh(sprintf('/users/%s', universe))
594+
if(nchar(name)){
595+
universe <- switch(name,
596+
'bioc' = 'bioconductor',
597+
'bioc-release' = 'bioconductor',
598+
'r-multiverse-staging' = 'r-multiverse',
599+
'ropensci-champions' = 'ropensci',
600+
name
601+
)
602+
gh::gh(sprintf('/users/%s', universe))
603+
}
602604
}
603605

604606
current_info <- function(package){

0 commit comments

Comments
 (0)