From 38477067d91a639a413f4c7905f3ad2e9cf53b7c Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 22 May 2020 14:41:06 +0200 Subject: [PATCH] Fix isolated dlopen In `locate`, when launching an external Julia to test whether dlopen work on a library, pass `--startup-file=no` to the subprocess to avoid any issues with commands in a user's startup.jl file. Fixes #194 On master, this was already fixed by PR #189 --- src/Products.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Products.jl b/src/Products.jl index 2a5c060..4bc51e5 100644 --- a/src/Products.jl +++ b/src/Products.jl @@ -166,7 +166,7 @@ function locate(lp::LibraryProduct; verbose::Bool = false, if isolate # Isolated dlopen is a lot slower, but safer dl_esc_path = replace(dl_path, "\\"=>"\\\\") - if success(`$(Base.julia_cmd()) -e "import Libdl; Libdl.dlopen(\"$(dl_esc_path)\")"`) + if success(`$(Base.julia_cmd()) --startup-file=no -e "import Libdl; Libdl.dlopen(\"$(dl_esc_path)\")"`) return dl_path end else