Skip to content

Commit 30237c7

Browse files
authored
ensure proper error message if we have slashes in problem set branch name (#313)
1 parent e413950 commit 30237c7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/discord-cluster-manager/cogs/admin_cog.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,9 @@ async def update_problems(
526526
)
527527
return
528528

529+
if "/" in branch:
530+
raise KernelBotError(f"branch names with slashes (`{branch}`) are not supported.")
531+
529532
repository_name = repository_name or env.PROBLEMS_REPO
530533
url = f"https://github.com/{repository_name}/archive/{branch}.zip"
531534
folder_name = repository_name.split("/")[-1] + "-" + branch

0 commit comments

Comments
 (0)