@@ -16,21 +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" )
23- # templatedir = "/usr/share/git-core/template"
24- # templatedir = "/workspace/destdir/share/git-core/templates"
25- templatedir =
26-
27- sep = _separator ()
2835
2936 env_mapping = Dict {String,String} ()
30- env_mapping[" GIT_EXEC_PATH" ] = git_core
37+ env_mapping[" GIT_EXEC_PATH" ] = libexec_git_core
3138 env_mapping[" GIT_SSL_CAINFO" ] = ssl_cert
32- env_mapping[" GIT_TEMPLATE_DIR" ] = templatedir
33- 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
3441 if haskey (ENV , " PATH" )
3542 env_mapping[" PATH" ] = ENV [" PATH" ]
3643 end
0 commit comments