Преглед изворни кода

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

wassaf shahzad пре 1 година
родитељ
комит
4056ad613f
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      reflex/utils/prerequisites.py

+ 3 - 1
reflex/utils/prerequisites.py

@@ -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)