Skip to content

Commit

Permalink
Return 1 if any exception happens
Browse files Browse the repository at this point in the history
  • Loading branch information
Cibbi committed Oct 31, 2023
1 parent 1519bb6 commit f546041
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions VRLabs.VRCTools.Packaging.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,19 @@

command.SetHandler(async (source, output, releaseUrl, unityReleaseUrl, version, noVcc, noUnity, action) =>
{
Environment.SetEnvironmentVariable("RUNNING_ON_GITHUB_ACTIONS", action ? "true" : "false");
var result = await Packager.CreatePackage(source, output, releaseUrl, unityReleaseUrl, version, noVcc, noUnity);
if (!result)
try
{
Log.Error("Failed to create package");
Environment.SetEnvironmentVariable("RUNNING_ON_GITHUB_ACTIONS", action ? "true" : "false");
var result = await Packager.CreatePackage(source, output, releaseUrl, unityReleaseUrl, version, noVcc, noUnity);
if (!result)
{
Log.Error("Failed to create package");
Environment.Exit(1);
}
}
catch (Exception e)
{
Log.Error(e, "Failed to create package");
Environment.Exit(1);
}

Expand Down

0 comments on commit f546041

Please sign in to comment.