From 8140dc17b587484e430b6d6d40929f7a7e6194f0 Mon Sep 17 00:00:00 2001 From: Lou D'Andria Date: Thu, 19 Jul 2018 16:50:59 -0500 Subject: [PATCH] Allow GitLink`Private`$GitCredentialsFile to be set before GitLink is loaded. --- GitLink/Kernel/GitLink.wl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/GitLink/Kernel/GitLink.wl b/GitLink/Kernel/GitLink.wl index d3fe5f3..6c8a524 100644 --- a/GitLink/Kernel/GitLink.wl +++ b/GitLink/Kernel/GitLink.wl @@ -110,7 +110,11 @@ Block[{path, $LibraryPath = Join[$GitLibraryPath, $LibraryPath], libname}, $Failed, $GitLibrary = path; - $GitCredentialsFile = SelectFirst[FileNameJoin[{$HomeDirectory, ".ssh", #}] & /@ {"id_rsa", "id_dsa"}, FileExistsQ, FileNameJoin[{$HomeDirectory, ".ssh", "id_rsa"}]]; + If[!StringQ[$GitCredentialsFile], $GitCredentialsFile = SelectFirst[ + FileNameJoin[{$HomeDirectory, ".ssh", #}] & /@ {"id_rsa", "id_dsa"}, + FileExistsQ, + FileNameJoin[{$HomeDirectory, ".ssh", "id_rsa"}] + ]]; GL`GitLibraryInformation = glFunctionLoad[False, "GitLibraryInformation", LinkObject, LinkObject];