Skip to content

Commit

Permalink
fix: Handle trailing slash in repo_url (#29)
Browse files Browse the repository at this point in the history
Signed-off-by: Dhanus <dhanus3133@gmail.com>
  • Loading branch information
Dhanus3133 authored Oct 9, 2024
1 parent 4b5cb53 commit 2dbc975
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ async def get():
async def post(repo_url: str, regenerate: bool = False):
logging.info(f"Generating devcontainer.json for: {repo_url}")

# Normalize the repo_url by stripping trailing slashes
repo_url = repo_url.rstrip('/')

try:
exists, existing_record = check_url_exists(repo_url)
logging.info(f"URL check result: exists={exists}, existing_record={existing_record}")
Expand Down

0 comments on commit 2dbc975

Please sign in to comment.