Skip to content

Commit

Permalink
Abort when no results files are found
Browse files Browse the repository at this point in the history
  • Loading branch information
azimov committed Feb 26, 2025
1 parent 9fa5ecc commit 9ec60b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ Imports:
tidyr (>= 1.2.0),
CohortGenerator (>= 0.10.0),
remotes,
scales
scales,
cli
Suggests:
Eunomia,
RSQLite (>= 2.2.1),
Expand Down
4 changes: 4 additions & 0 deletions R/Shiny.R
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ createMergedResultsFile <-
recursive = TRUE
)

if (legnth(listOfZipFilesToUpload) == 0) {
cli::cli_abort("No result files found in folder", dataFolder)
}

for (zipFileName in listOfZipFilesToUpload) {
uploadResults(
connectionDetails = connectionDetails,
Expand Down

0 comments on commit 9ec60b1

Please sign in to comment.