UGS: Fix version string displayed by the "UGS version" command.

#jira UE-154819
#preflight none

[CL 20468288 by Ben Marsh in ue5-main branch]
This commit is contained in:
Ben Marsh
2022-06-02 08:55:57 -04:00
parent 511ab1946d
commit 79181c5514

View File

@@ -1159,7 +1159,11 @@ namespace UnrealGameSyncCmd
{
public override Task ExecuteAsync(CommandContext Context)
{
Console.WriteLine("UnrealGameSync {0}", Assembly.GetExecutingAssembly().GetName().Version?.ToString());
ILogger Logger = Context.Logger;
AssemblyInformationalVersionAttribute? Version = Assembly.GetExecutingAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>();
Logger.LogInformation("UnrealGameSync {Version}", Version?.InformationalVersion ?? "Unknown");
return Task.CompletedTask;
}
}