Skip to content

Commit

Permalink
Merge pull request #97 from sanger-bentley-group/feature/skip-results…
Browse files Browse the repository at this point in the history
…-dir-check-on-resume

Skip existing results_dir check when resuming
  • Loading branch information
HarryHung authored Dec 9, 2024
2 parents 1e27ba3 + da38625 commit 8171505
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions main.nf
Original file line number Diff line number Diff line change
@@ -115,9 +115,11 @@ if (params.surfacetyper_min_read_depth < 0){
results_dir = file(params.results_dir)

if (results_dir.exists()){
println("This results directory already exists. Specify a new --results_dir or remove your existing one.")
println("Print help with nextflow main.nf --help")
System.exit(1)
if (workflow.resume !== true) {
println("This results directory already exists. Specify a new --results_dir or remove your existing one.")
println("Print help with nextflow main.nf --help")
System.exit(1)
}
} else {
results_dir.mkdir()
}

0 comments on commit 8171505

Please sign in to comment.