From 295898c4d1ca9a155aa2d7c89378cbf32ffc642e Mon Sep 17 00:00:00 2001 From: Ian Date: Sun, 9 Apr 2023 17:48:56 -0400 Subject: [PATCH] check isinteractive at runtime --- base/loading.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/loading.jl b/base/loading.jl index c36990fd3a07e..65dc91abf6bea 100644 --- a/base/loading.jl +++ b/base/loading.jl @@ -1799,7 +1799,7 @@ function _require(pkg::PkgId, env=nothing) if JLOptions().use_compiled_modules != 0 if (0 == ccall(:jl_generating_output, Cint, ())) || (JLOptions().incremental != 0) - if !pkg_precompile_attempted && isassigned(PKG_PRECOMPILE_HOOK) + if !pkg_precompile_attempted && isinteractive() && isassigned(PKG_PRECOMPILE_HOOK) pkg_precompile_attempted = true unlock(require_lock) try