Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More robust installation of BugReporting package. #35802

Merged
merged 1 commit into from
May 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions stdlib/InteractiveUtils/src/InteractiveUtils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,14 @@ function report_bug(kind)
let Pkg = Base.require(Base.PkgId(
Base.UUID((0x44cfe95a_1eb2_52ea,0xb672_e2afdf69b78f)), "Pkg"))
mktempdir() do tmp
prev_active = Base.ACTIVE_PROJECT[]
env_path = joinpath(tmp, "TmpForBugReporting")
Pkg.generate(env_path)
Pkg.activate(env_path)
old_load_path = copy(LOAD_PATH)
push!(empty!(LOAD_PATH), joinpath(tmp, "Project.toml"))
fredrikekre marked this conversation as resolved.
Show resolved Hide resolved
old_home_project = Base.HOME_PROJECT[]
Base.HOME_PROJECT[] = nothing
Pkg.add(Pkg.PackageSpec(BugReportingId.name, BugReportingId.uuid))
BugReporting = Base.require(BugReportingId)
Base.ACTIVE_PROJECT[] = prev_active
append!(empty!(LOAD_PATH), old_load_path)
Base.HOME_PROJECT[] = old_home_project
end
end
else
Expand Down