Skip to content

Commit

Permalink
Use JULIA_LOAD_PATH environment variable (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
devmotion committed Feb 22, 2022
1 parent 448fd1a commit a50f7c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 0 additions & 4 deletions docs/literate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ const EXAMPLE = basename(EXAMPLEDIR)
const OUTDIR = joinpath(@__DIR__, "src", RELOUTDIR, EXAMPLE)
mkpath(OUTDIR)

# Add current directory to LOAD_PATH: by stacking environments we can load Literate
# without adding it to each example
push!(LOAD_PATH, @__DIR__)

# Load non-example specific packages
using Literate: Literate # from stacked environment
using InteractiveUtils: InteractiveUtils
Expand Down
7 changes: 6 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,15 @@ let

# Run examples asynchronously
literatejl = joinpath(@__DIR__, "literate.jl")
# Add current directory to LOAD_PATH: by stacking environments we can load Literate
# without adding it to each example
cmd = addenv(
Base.julia_cmd(), "JULIA_LOAD_PATH" => (Sys.iswindows() ? ";" : ":") * @__DIR__
)
processes = map(examples) do example
return run(
pipeline(
`$(Base.julia_cmd()) --project=$example $literatejl examples`;
`$cmd --project=$example $literatejl examples`;
stdin=devnull,
stdout=devnull,
stderr=stderr,
Expand Down

0 comments on commit a50f7c9

Please sign in to comment.