improvement: Add sparkd (config-server) opt to configcheck cli

This commit is contained in:
John Colvin committed 2023-03-20 13:26:44 -04:00
1 parent b044ff3b2a
commit f4794bea33
1 file changed
+9 -1
@@ -9,12 +9,20 @@ namespace bts {
public class ConfigcheckOptions {
[Value(0, MetaName="keys", HelpText="Keys to print")]
public IEnumerable<string> keys { get; set; }
[Option("sparkd", MetaValue = "URL", HelpText = "The sparkd server")]
public string sparkd { get; set; }
}
public class Configcheck {
public static int Run(ConfigcheckOptions options) {
var keys = options.keys.ToArray();
if (options.sparkd is not null) {
var args = Environment.GetCommandLineArgs();
BTS.set_config_arg(args, options.sparkd);
}
mbts.config.Configuration.configcheck(keys.Length, keys);
return 0;
}
}
}
}