Skip to content
This repository was archived by the owner on Mar 26, 2021. It is now read-only.

Commit 580d45a

Browse files
Merge #23
23: Fix template directory r=DilumAluthge a=DilumAluthge Fixes #22 Co-authored-by: Dilum Aluthge <[email protected]>
2 parents 5676e09 + 9bab845 commit 580d45a

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "GitCommand"
22
uuid = "49b5b516-ca3f-4003-a081-42bdcf55082d"
33
authors = ["Dilum Aluthge", "Brown Center for Biomedical Informatics"]
4-
version = "0.1.1"
4+
version = "0.1.2"
55

66
[deps]
77
Git_jll = "f8c6e375-362e-5223-8a59-34ff63f689eb"

src/env_mapping.jl

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,28 @@ function _env_mapping(; adjust_PATH::Bool = true,
1616
end
1717
git_path, env_mapping = Git_jll.git(; adjust_PATH = adjust_PATH,
1818
adjust_LIBPATH = adjust_LIBPATH) do git_path
19-
git_core = joinpath(dirname(dirname(git_path)), "libexec", "git-core")
19+
sep = _separator()
20+
21+
root = dirname(dirname(git_path))
22+
23+
libexec = joinpath(root, "libexec")
24+
libexec_git_core = joinpath(libexec, "git-core")
25+
26+
share = joinpath(root, "share")
27+
share_git_core = joinpath(share, "git-core")
28+
share_git_core_templates = joinpath(share_git_core, "templates")
29+
2030
libcurlpath = dirname(Git_jll.LibCURL_jll.libcurl_path)
2131
originallibpath = get(ENV, Git_jll.LIBPATH_env, "")
32+
newlibpath = "$(libcurlpath)$(sep)$(originallibpath)"
33+
2234
ssl_cert = joinpath(dirname(Sys.BINDIR), "share", "julia", "cert.pem")
2335

24-
sep = _separator()
25-
2636
env_mapping = Dict{String,String}()
27-
env_mapping["GIT_EXEC_PATH"] = git_core
37+
env_mapping["GIT_EXEC_PATH"] = libexec_git_core
2838
env_mapping["GIT_SSL_CAINFO"] = ssl_cert
29-
env_mapping[Git_jll.LIBPATH_env] = "$(libcurlpath)$(sep)$(originallibpath)"
39+
env_mapping["GIT_TEMPLATE_DIR"] = share_git_core_templates
40+
env_mapping[Git_jll.LIBPATH_env] = newlibpath
3041
if haskey(ENV, "PATH")
3142
env_mapping["PATH"] = ENV["PATH"]
3243
end

0 commit comments

Comments
 (0)