Skip to content

Commit

Permalink
Make sure tarballs directory exists before returning from `initialize…
Browse files Browse the repository at this point in the history
…_raa()`
  • Loading branch information
jthompson-arcus committed Aug 5, 2024
1 parent e9d8831 commit cba30d9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/utils_startup.R
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,10 @@ initialize_raa <- function(assess_db, cred_db, configuration) {

check_repos(db_config[["package_repo"]])

if (file.exists(assessment_db) && (isTRUE(getOption("shiny.testmode")) || use_shinymanager && file.exists(credentials_db)))
return(invisible(c(assessment_db, if (!isTRUE(getOption("shiny.testmode")) & use_shinymanager) credentials_db)))
if (!dir.exists("tarballs")) dir.create("tarballs")

if (file.exists(assessment_db) && (use_shinymanager && file.exists(credentials_db)))
return(invisible(c(assessment_db, if (use_shinymanager) credentials_db)))

check_credentials(db_config[["credentials"]])

Expand All @@ -243,8 +245,6 @@ initialize_raa <- function(assess_db, cred_db, configuration) {
} else if (!identical(decisions$decision, decision_categories)) {
stop("The decision categories in the configuration file do not match those in the assessment database.")
}

if (!dir.exists("tarballs")) dir.create("tarballs")

invisible(c(assessment_db, if (use_shinymanager) credentials_db))
}
Expand Down

0 comments on commit cba30d9

Please # to comment.