Skip to content

Commit

Permalink
bugfix: use dir derived from url instead of url
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandf committed Oct 18, 2023
1 parent 5b8f966 commit c4b07d2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/engine/src/helpers/TemplateRepository.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ def __init__(self, cache_dir: str):
self.git_cache_service = GitCacheService(cache_dir=cache_dir)

def get_by_uses(self, uses: Uses):
git_repo_dir = self._url_to_directory(uses.source.url)
self.git_cache_service.add_or_update(
uses.source.url,
self._url_to_directory(uses.source.url)
git_repo_dir
)

template_root_dir = os.path.join(self.cache_dir, uses.source.url)
template_root_dir = os.path.join(self.cache_dir, git_repo_dir)

try:
# Open the owe-config.json file
Expand All @@ -44,5 +45,5 @@ def _url_to_directory(self, url):
parsed_url.hostname,
*[part.lstrip("/") for part in parsed_url.path.split("/")]
)

return directory

0 comments on commit c4b07d2

Please sign in to comment.