Skip to content

Commit 09f4df0

Browse files
authored
read symlink instead of throwing an error (#207)
1 parent 78e63ec commit 09f4df0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

deps/build.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ function find_matlab_root()
88
get(ENV, "MATLAB_HOME", nothing))
99
if isnothing(matlab_root)
1010
matlab_exe = Sys.which("matlab")
11-
if !isnothing(matlab_exe) && !islink(matlab_exe) # guard against /usr/local
11+
if !isnothing(matlab_exe)
12+
matlab_exe = islink(matlab_exe) ? readlink(matlab_exe) : matlab_exe # guard against /usr/local
1213
matlab_root = dirname(dirname(matlab_exe))
1314
else
1415
if Sys.isapple()

0 commit comments

Comments
 (0)