Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for tarball directory #813

Merged
merged 3 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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