Skip to content

Commit dd77a37

Browse files
committed
Fix with_libgfortran() with multiple libpath directories
The creation of `libpath_list` assumed that there would only be one directory in `LD_LIBRARY_PATH` (or the equivalents on other platforms), if there were more then creating the list would fail because Julia would try to `hcat()` all the elements together and throw an error about them having different lengths. Somewhat scarily, this would've silently done the wrong thing if `libpath_list` was a column vector instead of a row vector O_o (i.e. if it originally had a comma between the elements)
1 parent 96bccb8 commit dd77a37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/runtests.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ else
2020
("LD_LIBRARY_PATH", ":")
2121
end
2222
function with_libgfortran(f::Function)
23-
libpath_list = [csl_path split(get(ENV, LIBPATH_var, ""), envsep)]
23+
libpath_list = [csl_path, split(get(ENV, LIBPATH_var, ""), envsep)...]
2424
libpath = join(filter(x -> !isempty(x), libpath_list), envsep)
2525
withenv(f, LIBPATH_var => libpath)
2626
end

0 commit comments

Comments
 (0)