Skip to content

Commit

Permalink
Fix loading event path
Browse files Browse the repository at this point in the history
  • Loading branch information
xoofx committed Feb 27, 2022
1 parent 3889454 commit d62d6eb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/dotnet-releaser/Helpers/GitHubActionHelper.cs
Expand Up @@ -38,7 +38,14 @@ public static class GitHubActionHelper
var eventJson = new Dictionary<string, object?>();
if (File.Exists(eventJsonPath))
{
eventJson = JsonHelper.FromFile(File.ReadAllText(eventJsonPath)) as Dictionary<string, object?> ?? eventJson;
try
{
eventJson = JsonHelper.FromFile(eventJsonPath) as Dictionary<string, object?> ?? eventJson;
}
catch (Exception ex)
{
Console.WriteLine($"Error while reading GITHUB_EVENT_PATH {eventJsonPath}. Reason: {ex.Message}");
}
}

return new GitHubActionInfo(owner, repo, eventName, refName, refType, eventJson);
Expand Down

0 comments on commit d62d6eb

Please sign in to comment.