Skip to content

Commit

Permalink
Handle NuGet.Config and ProdCon.txt missing
Browse files Browse the repository at this point in the history
That's not really likely to happen, unless the SSL/HTTP stack itself is
broken. But if that's the case, the runner should try and continue
without the extra configuration.

It's possible to run into this if OpenSSL 3.0 is the system OpenSSL
library and .NET (using OpenSSL 1.1) has some problems using the OpenSSL
3.0 configuration at /etc/ssl/openssl.conf.

Also use Exception.ToString() everywhere to see the full exception stack
traces.
  • Loading branch information
omajid committed Aug 26, 2021
1 parent 01dec3e commit a8d662a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ Some notes for writing tests:

$ git push --tags remote-name

OR, better:

$ git push remote-name tag-name

3. GitHub Actions will create a draft release corresponding to the tag.

It will also attach the `turkey` and `turkey-$arch` binaries to the release.
Expand Down
11 changes: 6 additions & 5 deletions Turkey/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ public static async Task<string> GenerateNuGetConfigIfNeededAsync(string additio
catch( HttpRequestException exception )
{
Console.WriteLine("WARNING: failed to get ProdCon url. Ignoring Exception:");
Console.WriteLine(exception.Message);
Console.WriteLine(exception.StackTrace);
Console.WriteLine(exception.ToString());
}

string nugetConfig = null;
Expand All @@ -162,11 +161,13 @@ public static async Task<string> GenerateNuGetConfigIfNeededAsync(string additio
catch( HttpRequestException exception )
{
Console.WriteLine("WARNING: failed to get NuGet.config from source-build. Ignoring Exception:");
Console.WriteLine(exception.Message);
Console.WriteLine(exception.StackTrace);
Console.WriteLine(exception.ToString());
}

return await nuget.GenerateNuGetConfig(urls, nugetConfig);
if (urls.Any() || nugetConfig != null)
{
return await nuget.GenerateNuGetConfig(urls, nugetConfig);
}
}

return null;
Expand Down
2 changes: 1 addition & 1 deletion Turkey/SourceBuild.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public async Task<string> GetNuGetConfigAsync(Version version)
}
catch( HttpRequestException e )
{
Console.WriteLine($"WARNING: {e.Message}");
Console.WriteLine($"WARNING: {e.ToString()}");
}

return nugetConfig;
Expand Down

0 comments on commit a8d662a

Please sign in to comment.