Skip to content

Commit 9a8fedd

Browse files
fredrikekreKristofferC
authored andcommitted
More robust installation of BugReporting package. (#35802)
(cherry picked from commit 43d8a28)
1 parent 326d26a commit 9a8fedd

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

stdlib/InteractiveUtils/src/InteractiveUtils.jl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -363,13 +363,14 @@ function report_bug(kind)
363363
let Pkg = Base.require(Base.PkgId(
364364
Base.UUID((0x44cfe95a_1eb2_52ea,0xb672_e2afdf69b78f)), "Pkg"))
365365
mktempdir() do tmp
366-
prev_active = Base.ACTIVE_PROJECT[]
367-
env_path = joinpath(tmp, "TmpForBugReporting")
368-
Pkg.generate(env_path)
369-
Pkg.activate(env_path)
366+
old_load_path = copy(LOAD_PATH)
367+
push!(empty!(LOAD_PATH), joinpath(tmp, "Project.toml"))
368+
old_home_project = Base.HOME_PROJECT[]
369+
Base.HOME_PROJECT[] = nothing
370370
Pkg.add(Pkg.PackageSpec(BugReportingId.name, BugReportingId.uuid))
371371
BugReporting = Base.require(BugReportingId)
372-
Base.ACTIVE_PROJECT[] = prev_active
372+
append!(empty!(LOAD_PATH), old_load_path)
373+
Base.HOME_PROJECT[] = old_home_project
373374
end
374375
end
375376
else

0 commit comments

Comments
 (0)