Merge pull request #2573 from Significant-Gravitas/fix/symlinks-in-workspace-path

fix(workspace): resolve symlinks in workspace path before checking
This commit is contained in:
Richard Beales
2023-04-19 21:49:03 +01:00
committed by GitHub

View File

@@ -37,6 +37,7 @@ def safe_path_join(base: Path, *paths: str | Path) -> Path:
Returns:
Path: The joined path
"""
base = base.resolve()
joined_path = base.joinpath(*paths).resolve()
if CFG.restrict_to_workspace and not joined_path.is_relative_to(base):