Skip to content

Commit

Permalink
Fix crash when hover .cfg.in in gitlens views
Browse files Browse the repository at this point in the history
  • Loading branch information
perrinjerome committed Sep 19, 2023
1 parent f68efb6 commit 2fc6010
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions server/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning][semver].

## Unreleased

### Fixed

- server: Fix crash when hover .cfg.in in gitlens views

## [0.9.2] - 2023-02-24

### Fixed
Expand Down
7 changes: 5 additions & 2 deletions server/buildoutls/buildout.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,11 @@ async def getTemplate(
uri = urllib.parse.urljoin(base, uri)
uris.add(uri)
else:
assert uri.startswith('file://')
assert self.uri.startswith('file://')
if not uri.startswith('file://'):
# this might be a "virtual" scheme, for example gitlens:// is used in the git
# history views
return None
assert self.uri.startswith('file://'), self.uri
uri_path = pathlib.Path(uri[len('file://'):])
uris.add(
str(
Expand Down

0 comments on commit 2fc6010

Please sign in to comment.