fix: removed .git in template URL (#3049)

This commit is contained in:
wassaf shahzad 2024-04-12 00:35:34 +02:00 committed by GitHub
parent 6837eb8e8f
commit 4056ad613f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1384,7 +1384,9 @@ def initialize_app(app_name: str, template: str | None = None):
else:
# Check if the template is a github repo.
if template.startswith("https://github.com"):
template_url = f"{template.strip('/')}/archive/main.zip"
template_url = (
f"{template.strip('/').replace('.git', '')}/archive/main.zip"
)
else:
console.error(f"Template `{template}` not found.")
raise typer.Exit(1)