Skip to content

Commit

Permalink
Allow GitLinkPrivate$GitCredentialsFile to be set before GitLink is…
Browse files Browse the repository at this point in the history
… loaded.
  • Loading branch information
ljdandria committed Jul 19, 2018
1 parent 5cd1e37 commit 8140dc1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion GitLink/Kernel/GitLink.wl
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down

0 comments on commit 8140dc1

Please sign in to comment.