// Copyright Epic Games, Inc. All Rights Reserved.
using System.ComponentModel;
using EpicGames.Core;
using EpicGames.Horde;
using Microsoft.Extensions.Logging;
namespace Horde.Commands
{
[Command("config", "Updates the configuration for the Horde tool")]
class ConfigCommand : Command
{
[CommandLine("-Server=")]
[Description("Updates the server URL")]
public string? Server { get; set; }
///
public override Task ExecuteAsync(ILogger logger)
{
if (Server != null)
{
HordeOptions.SetDefaultServerUrl(new Uri(Server));
}
logger.LogInformation("Server: {Server}", HordeOptions.GetDefaultServerUrl());
return Task.FromResult(0);
}
}
}