Skip to content

Commit 09ba82d

Browse files
committed
Fix readall and isexecutable deprecations
1 parent c2812ca commit 09ba82d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mxbase.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function get_paths()
1212

1313
if matlab_homepath == ""
1414
if OS_NAME == :Linux
15-
matlab_homepath = dirname(dirname(realpath(chomp(readall(`which matlab`)))))
15+
matlab_homepath = dirname(dirname(realpath(chomp(readstring(`which matlab`)))))
1616
elseif OS_NAME == :Darwin
1717
apps = readdir("/Applications")
1818
filter!(app -> ismatch(r"^MATLAB_R[0-9]+[ab]\.app$", app), apps)
@@ -37,7 +37,7 @@ function get_paths()
3737

3838
if OS_NAME != :Windows
3939
default_startcmd = joinpath(matlab_homepath, "bin", "matlab")
40-
if !isexecutable(default_startcmd)
40+
if !isfile(default_startcmd)
4141
error("The MATLAB path is invalid. Set the MATLAB_HOME evironmental variable to the MATLAB root.")
4242
end
4343
default_startcmd = "exec $(Base.shell_escape(default_startcmd)) -nosplash"

0 commit comments

Comments
 (0)