Skip to content

Commit

Permalink
Final prep for 0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
TraceEntertains committed Sep 1, 2024
1 parent 738264e commit 2a96f65
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tns2tool/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,20 @@ static void PopulateVersionInfo()
VersionMinor = (byte)version.Minor;
VersionRevision = (byte)version.Revision;

InformationalVersion =
FileVersionInfo.GetVersionInfo(Environment.ProcessPath!).ProductVersion!;
try
{
InformationalVersion =
FileVersionInfo.GetVersionInfo(Environment.ProcessPath!).ProductVersion!;
}
catch (Exception ex)

Check warning on line 35 in tns2tool/Program.cs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, Release)

The variable 'ex' is declared but never used

Check warning on line 35 in tns2tool/Program.cs

View workflow job for this annotation

GitHub Actions / Build (macOS-latest, Release)

The variable 'ex' is declared but never used

Check warning on line 35 in tns2tool/Program.cs

View workflow job for this annotation

GitHub Actions / Build (windows-latest, Release)

The variable 'ex' is declared but never used
{
#if DEBUG
Console.WriteLine("Error getting InformationalVersion: " + ex.Message);
#endif

// fallback informational version, hopefully we never need this
InformationalVersion = $"{VersionMajor}.{VersionMinor}.{VersionRevision}";
}
}

static void Main(string[] args)
Expand Down

0 comments on commit 2a96f65

Please sign in to comment.