From 2de1919d3441036d0a05611adc69ede22f4d9a94 Mon Sep 17 00:00:00 2001 From: Aaron Robinson Date: Sat, 26 Nov 2022 21:22:45 -0600 Subject: [PATCH] Fix build command on net7.0 --- ThunderstoreCLI/Configuration/CLIParameterConfig.cs | 4 +++- ThunderstoreCLI/Configuration/Config.cs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ThunderstoreCLI/Configuration/CLIParameterConfig.cs b/ThunderstoreCLI/Configuration/CLIParameterConfig.cs index 40f5d3d..9bc8fac 100644 --- a/ThunderstoreCLI/Configuration/CLIParameterConfig.cs +++ b/ThunderstoreCLI/Configuration/CLIParameterConfig.cs @@ -18,7 +18,9 @@ public override GeneralConfig GetGeneralConfig() } } -public abstract class CLIParameterConfig : BaseConfig where T : PackageOptions +public interface CLIConfig { } + +public abstract class CLIParameterConfig : BaseConfig, CLIConfig where T : PackageOptions { public CLIParameterConfig(T opts) : base(opts) { } diff --git a/ThunderstoreCLI/Configuration/Config.cs b/ThunderstoreCLI/Configuration/Config.cs index 254f9cc..28d3aac 100644 --- a/ThunderstoreCLI/Configuration/Config.cs +++ b/ThunderstoreCLI/Configuration/Config.cs @@ -33,7 +33,7 @@ public static Config FromCLI(IConfigProvider cliConfig) List providers = new(); providers.Add(cliConfig); providers.Add(new EnvironmentConfig()); - if (cliConfig.GetType().IsSubclassOf(typeof(CLIParameterConfig<>))) + if (cliConfig is CLIConfig) providers.Add(new ProjectFileConfig()); providers.Add(new BaseConfig()); return Parse(providers.ToArray());