diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50eb82d6..98e73dfc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,7 @@ jobs: TERM="xterm" julia --project --code-coverage=user -e ' using InteractiveUtils, REPL, Revise @async(Base.run_main_repl(true, true, false, true, false)) - while !isdefined(Base, :active_repl_backend) sleep(0.1) end + while (!isdefined(Base, :active_repl_backend) || isnothing(Base.active_repl_backend)) sleep(0.1) end pushfirst!(Base.active_repl_backend.ast_transforms, Revise.revise_first) include(joinpath("test", "runtests.jl")) if Base.VERSION.major == 1 && Base.VERSION.minor >= 9 diff --git a/src/utils.jl b/src/utils.jl index 4d65d81b..69f97c06 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -145,6 +145,7 @@ task, so a `yield` will need to occur before it happens. """ function throwto_repl(e::Exception) if isdefined(Base, :active_repl_backend) && + !isnothing(Base.active_repl_backend) && Base.active_repl_backend.backend_task.state === :runnable && isempty(Base.Workqueue) && Base.active_repl_backend.in_eval diff --git a/test/start_late.jl b/test/start_late.jl index db101f77..b8acf5ed 100644 --- a/test/start_late.jl +++ b/test/start_late.jl @@ -4,7 +4,7 @@ using Test @async(Base.run_main_repl(true, true, false, true, false)) -while !isdefined(Base, :active_repl_backend) +while !isdefined(Base, :active_repl_backend) || isnothing(Base.active_repl_backend) sleep(0.5) end