Skip to content

Commit

Permalink
Safer loading
Browse files Browse the repository at this point in the history
  • Loading branch information
chriselrod committed Mar 22, 2022
1 parent a9a0204 commit ba6ad14
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "CPUSummary"
uuid = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9"
authors = ["chriselrod <[email protected]> and contributors"]
version = "0.1.16"
version = "0.1.17"

[deps]
Hwloc = "0e44f5e4-bd66-52a0-8798-143a42290a1d"
Expand Down
6 changes: 5 additions & 1 deletion src/CPUSummary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ use_hwloc(b) = @set_preferences!("hwloc" => b)

@static if USE_HWLOC
try
p = run(`$(Base.julia_cmd()) --project=$(Base.active_project()) -e'using Hwloc; Hwloc.gettopology()'`, wait=false)
script = """
$(Base.load_path_setup_code())
using Hwloc; Hwloc.gettopology()
"""
p = run(`$(Base.julia_cmd()) -e $(script)`, wait=false)
wait(p)
if p.exitcode == 0 && p.termsignal == 0
include("topology.jl")
Expand Down

0 comments on commit ba6ad14

Please sign in to comment.