Skip to content

Commit 725b846

Browse files
committed
need to resolve path before taking parent in case of symlink
1 parent 68d2cba commit 725b846

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/activateMatlab.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def _windows_search(release: str) -> Path | None:
5353
return p
5454

5555
if (r := shutil.which("matlab")) is not None:
56-
if (p := Path(r).parent / "win64").is_dir():
56+
if (p := Path(r).resolve().parent / "win64").is_dir():
5757
logging.info(f"Using Matlab from PATH: {p}")
5858
return p
5959

@@ -83,7 +83,7 @@ def _macos_search(release: str) -> Path | None:
8383
def _linux_search(release: str) -> Path | None:
8484

8585
if (r := shutil.which("matlab")) is not None and release in r:
86-
if (p := Path(r).parent / "glnxa64").is_dir():
86+
if (p := Path(r).resolve().parent / "glnxa64").is_dir():
8787
logging.info(f"Using Matlab from PATH: {p}")
8888
return p
8989

0 commit comments

Comments
 (0)