From 09f4df05029de7466929ce916ab52e8b4263d396 Mon Sep 17 00:00:00 2001 From: Taylor McDonnell Date: Tue, 11 Jul 2023 21:41:02 -0700 Subject: [PATCH] read symlink instead of throwing an error (#207) --- deps/build.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deps/build.jl b/deps/build.jl index 85b7ffd..c849a69 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -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()