Skip to content

Commit

Permalink
Expand environment variables in path fed to LegendMeta()
Browse files Browse the repository at this point in the history
  • Loading branch information
iguinn committed Aug 5, 2024
1 parent 643c0ec commit 6539e16
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/legendmeta/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ def __init__(self, path: str | None = None, **kwargs) -> None:

def _init_metadata_repo(self):
"""Clone legend-metadata, if not existing, and checkout default Git ref."""
exp_path = os.path.expandvars(self._repo_path)
while self._repo_path != exp_path:
self._repo_path = exp_path
exp_path = os.path.expandvars(self._repo_path)

if not Path(self._repo_path).exists():
Path(self._repo_path).mkdir()

Expand Down

0 comments on commit 6539e16

Please sign in to comment.