Skip to content

Commit

Permalink
read symlink instead of throwing an error (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
taylormcd committed Jul 12, 2023
1 parent 78e63ec commit 09f4df0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ function find_matlab_root()
get(ENV, "MATLAB_HOME", nothing))
if isnothing(matlab_root)
matlab_exe = Sys.which("matlab")
if !isnothing(matlab_exe) && !islink(matlab_exe) # guard against /usr/local
if !isnothing(matlab_exe)
matlab_exe = islink(matlab_exe) ? readlink(matlab_exe) : matlab_exe # guard against /usr/local
matlab_root = dirname(dirname(matlab_exe))
else
if Sys.isapple()
Expand Down

0 comments on commit 09f4df0

Please sign in to comment.