From 2ed6e556f5acf390ae98633f6bf479a35a02312b Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Sun, 9 Apr 2023 20:56:26 -0400 Subject: [PATCH] Move interactive check in code load Pkg.precompile (#49304) --- 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