Skip to content

Commit

Permalink
Fix to halt site generation if the default branch is not valid.
Browse files Browse the repository at this point in the history
  • Loading branch information
qtzar committed Jul 7, 2023
1 parent 0fde981 commit 27ba480
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ class GenerateSiteCommand : Subcommand(

println("The following branches contain a valid Structurizr workspace: $branchesToGenerate")

if (!branchesToGenerate.contains(defaultBranch)) {
throw Exception("$defaultBranch does not contain a valid structurizr workspace. Site generation halted.")
}

branchesToGenerate.forEach { branch ->
println("Generating site for branch $branch")
clonedRepository.checkoutBranch(branch)
Expand Down

0 comments on commit 27ba480

Please sign in to comment.