diff --git a/Project.toml b/Project.toml index 1a33e16..182decb 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "TestEnv" uuid = "1e6cf692-eddd-4d53-88a5-2d735e33781b" -version = "1.103.5" +version = "1.103.6" [deps] Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" diff --git a/src/julia-1.11/activate_set.jl b/src/julia-1.11/activate_set.jl index ed6c7dc..7a50eba 100644 --- a/src/julia-1.11/activate_set.jl +++ b/src/julia-1.11/activate_set.jl @@ -87,7 +87,13 @@ function activate(pkg::AbstractString=current_pkg_name(); allow_reresolve=true) # Now that we have set up the sandbox environment, precompile all its packages: # (Reconnect the `io` back to the original context so the caller can see the # precompilation progress.) - Pkg._auto_precompile(temp_ctx; already_instantiated=true) + tmp_io = temp_ctx.io + try + temp_ctx.io = ctx.io + Pkg._auto_precompile(temp_ctx; already_instantiated=true) + finally + temp_ctx.io = tmp_io + end write_env(temp_ctx.env; update_undo=false) diff --git a/src/julia-1.12/activate_set.jl b/src/julia-1.12/activate_set.jl index cc51321..60f4597 100644 --- a/src/julia-1.12/activate_set.jl +++ b/src/julia-1.12/activate_set.jl @@ -87,7 +87,13 @@ function activate(pkg::AbstractString=current_pkg_name(); allow_reresolve=true) # Now that we have set up the sandbox environment, precompile all its packages: # (Reconnect the `io` back to the original context so the caller can see the # precompilation progress.) - Pkg._auto_precompile(temp_ctx; already_instantiated=true) + tmp_io = temp_ctx.io + try + temp_ctx.io = ctx.io + Pkg._auto_precompile(temp_ctx; already_instantiated=true) + finally + temp_ctx.io = tmp_io + end write_env(temp_ctx.env; update_undo=false) diff --git a/src/julia-1.13/activate_set.jl b/src/julia-1.13/activate_set.jl index cc51321..60f4597 100644 --- a/src/julia-1.13/activate_set.jl +++ b/src/julia-1.13/activate_set.jl @@ -87,7 +87,13 @@ function activate(pkg::AbstractString=current_pkg_name(); allow_reresolve=true) # Now that we have set up the sandbox environment, precompile all its packages: # (Reconnect the `io` back to the original context so the caller can see the # precompilation progress.) - Pkg._auto_precompile(temp_ctx; already_instantiated=true) + tmp_io = temp_ctx.io + try + temp_ctx.io = ctx.io + Pkg._auto_precompile(temp_ctx; already_instantiated=true) + finally + temp_ctx.io = tmp_io + end write_env(temp_ctx.env; update_undo=false) diff --git a/src/julia-1.9/activate_set.jl b/src/julia-1.9/activate_set.jl index 5cfa4cc..925f5e0 100644 --- a/src/julia-1.9/activate_set.jl +++ b/src/julia-1.9/activate_set.jl @@ -72,7 +72,13 @@ function activate(pkg::AbstractString=current_pkg_name(); allow_reresolve=true) # Now that we have set up the sandbox environment, precompile all its packages: # (Reconnect the `io` back to the original context so the caller can see the # precompilation progress.) - Pkg._auto_precompile(temp_ctx; already_instantiated=true) + tmp_io = temp_ctx.io + try + temp_ctx.io = ctx.io + Pkg._auto_precompile(temp_ctx; already_instantiated=true) + finally + temp_ctx.io = tmp_io + end write_env(temp_ctx.env; update_undo=false)