mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-20 05:48:14 +08:00
GH-242: Fix version retrieval for single file applications (#245)
This commit is contained in:
@ -25,6 +25,23 @@ namespace Spectre.Console.Cli
|
||||
return configurator;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the auto-detected version of the application.
|
||||
/// </summary>
|
||||
/// <param name="configurator">The configurator.</param>
|
||||
/// <param name="version">The version of application.</param>
|
||||
/// <returns>A configurator that can be used to configure the application further.</returns>
|
||||
public static IConfigurator SetApplicationVersion(this IConfigurator configurator, string version)
|
||||
{
|
||||
if (configurator == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(configurator));
|
||||
}
|
||||
|
||||
configurator.Settings.ApplicationVersion = version;
|
||||
return configurator;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Configures the console.
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user