Skip to content

Commit

Permalink
Changed: Ignore version.txt parse errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewer56 committed Jan 18, 2022
1 parent 10402e0 commit a1754ed
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions source/Reloaded.Mod.Launcher.Lib/Utility/Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ public static class Version
if (_version != null)
return _version;

if (File.Exists(Constants.VersionFilePath))
return SetAndReturnVersion(NuGetVersion.Parse(File.ReadAllText(Constants.VersionFilePath)));
try
{
if (File.Exists(Constants.VersionFilePath))
return SetAndReturnVersion(NuGetVersion.Parse(File.ReadAllText(Constants.VersionFilePath)));
}
catch { /* Ignore */ }

return SetAndReturnVersion(new NuGetVersion(Assembly.GetEntryAssembly()!.GetName().Version));
}
Expand Down

0 comments on commit a1754ed

Please sign in to comment.