Skip to content

Commit 12b28b5

Browse files
Error when no partition is defined when creating a workflow
1 parent 04935f0 commit 12b28b5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

R/utils.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ simple_brew <- function(file_in, placeholder_line, replacement_lines,
3535
#' @noRd
3636
create_ctrl_script <- function(wf_summary) {
3737
sbatch_opts <- wf_summary[["default_sbatch_opts"]]
38+
if (!"partition" %in% sbatch_opts)
39+
stop("A `partition` option must be defined in `default_sbatch_opts``")
3840
wf_vars <- make_wf_vars(wf_summary)
3941

4042
relevant_opts <- intersect(names(sbatch_opts), c("account", "partition"))
@@ -60,4 +62,3 @@ create_job_script <- function(wf_summary) {
6062
replacement_lines = make_sbatch_lines(sbatch_opts)
6163
)
6264
}
63-

inst/templates/workflow/SWF/controller.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,3 @@ then
3838
else
3939
echo "All steps are done"
4040
fi
41-

0 commit comments

Comments
 (0)