Skip to content

Commit

Permalink
add Pkg.dir to LOAD_PATH (to keep Documenter working)
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKarpinski committed Dec 31, 2017
1 parent 393b19c commit d22587c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions base/initdefs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ function init_load_path(BINDIR = Sys.BINDIR)
load_path = get(ENV, "JULIA_LOAD_PATH", "@|@v#.#.#|@v#.#|@v#|@default|@!v#.#")
append!(empty!(LOAD_PATH), parse_load_path(load_path))
vers = "v$(VERSION.major).$(VERSION.minor)"
push!(LOAD_PATH, Pkg.dir)
push!(LOAD_PATH, abspath(BINDIR, "..", "local", "share", "julia", "site", vers))
push!(LOAD_PATH, abspath(BINDIR, "..", "share", "julia", "site", vers))
end
Expand Down
2 changes: 2 additions & 0 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ function find_env(env::CurrentEnv, dir::AbstractString = pwd())
end
end

find_env(env::Function) = find_env(env())

load_path() = filter(env -> env != nothing, map(find_env, LOAD_PATH))

package_entry_points(path::AbstractString, name::AbstractString) = [
Expand Down

0 comments on commit d22587c

Please sign in to comment.