Skip to content

Commit

Permalink
Strip whitespace from CAPROVER_GIT_COMMIT_SHA environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
devxpy committed Aug 2, 2024
1 parent 8edbc18 commit 074e6d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ async def _exc_handler(request: Request, exc: Exception, template_name: str):

def github_url_for_exc(exc: Exception) -> str | None:
base_dir = str(settings.BASE_DIR)
ref = os.environ.get("CAPROVER_GIT_COMMIT_SHA") or "master"
ref = (os.environ.get("CAPROVER_GIT_COMMIT_SHA") or "master").strip()
for frame in reversed(traceback.extract_tb(exc.__traceback__)):
if not frame.filename.startswith(base_dir):
continue
Expand Down

0 comments on commit 074e6d8

Please sign in to comment.