Skip to content

Commit

Permalink
Merge pull request #813 from pharmaR/jt-tarball_directory_creation
Browse files Browse the repository at this point in the history
Check for tarball directory
  • Loading branch information
aclark02-arcus authored Aug 5, 2024
2 parents 3148426 + 1265f76 commit b04110a
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 113 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Fixed bug that incorrectly displayed 0 dependencies as 1 (#805)
* Fixed bug that kept full list of available packages from populating (#776)
* Removed `.recording` attribute from `riskmetric` assessments for storage purposes
* Ensured `tarballs` directory existed before returning from `initialize_raa()`

# riskassessment 3.1.0

Expand Down
8 changes: 4 additions & 4 deletions R/utils_startup.R
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,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 @@ -242,8 +244,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
Loading

0 comments on commit b04110a

Please sign in to comment.