Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6c1471e

Browse files
committed
Reorder libgit2 initialization and ssl cert location setting
1 parent 945e1bb commit 6c1471e

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

base/libgit2/libgit2.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -535,12 +535,6 @@ function set_ssl_cert_locations(cert_loc)
535535
end
536536

537537
function __init__()
538-
err = ccall((:git_libgit2_init, :libgit2), Cint, ())
539-
err > 0 || throw(ErrorException("error initializing LibGit2 module"))
540-
atexit() do
541-
ccall((:git_libgit2_shutdown, :libgit2), Cint, ())
542-
end
543-
544538
# Look for OpenSSL env variable for CA bundle (linux only)
545539
# windows and macOS use the OS native security backends
546540
@static if is_linux()
@@ -554,6 +548,12 @@ function __init__()
554548
end
555549
set_ssl_cert_locations(cert_loc)
556550
end
551+
552+
err = ccall((:git_libgit2_init, :libgit2), Cint, ())
553+
err > 0 || throw(ErrorException("error initializing LibGit2 module"))
554+
atexit() do
555+
ccall((:git_libgit2_shutdown, :libgit2), Cint, ())
556+
end
557557
end
558558

559559

deps/libgit2.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ $(build_datarootdir)/julia/cert.pem:
6969
else
7070
$(build_datarootdir)/julia/cert.pem: $(CERTFILE)
7171
mkdir -p $(build_datarootdir)/julia
72-
echo "NABIL: Copying over certfile $(CERTFILE)"
7372
-cp $(CERTFILE) $@
7473
endif
7574

0 commit comments

Comments
 (0)