Skip to content

Commit

Permalink
Init Curl at netkan startup
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Jul 9, 2020
1 parent fa03386 commit 2e7217f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Cmdline/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ public static int Main(string[] args)
// This is on by default in .NET 4.6, but not in 4.5.
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;

// Make sure Curl is all set up
Curl.Init();

try
{
return Execute(null, null, args);
Expand Down
5 changes: 5 additions & 0 deletions Netkan/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
using System.Net;
using System.Text;
using CommandLine;

using log4net;
using log4net.Core;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

using CKAN.Versioning;
using CKAN.NetKAN.Model;
using CKAN.NetKAN.Processors;
Expand Down Expand Up @@ -44,6 +46,9 @@ public static int Main(string[] args)
return ExitOk;
}

// Make sure Curl is all set up
Curl.Init();

if (!string.IsNullOrEmpty(Options.ValidateCkan))
{
var ckan = new Metadata(JObject.Parse(File.ReadAllText(Options.ValidateCkan)));
Expand Down

0 comments on commit 2e7217f

Please sign in to comment.