fix default listeners for config file (#777)

This commit is contained in:
L-Trump
2025-04-13 09:38:45 +08:00
committed by GitHub
parent 72ea8a9f76
commit 6a038e8a88
3 changed files with 12 additions and 11 deletions

View File

@@ -182,7 +182,6 @@ struct Cli {
env = "ET_LISTENERS",
value_delimiter = ',',
help = t!("core_clap.listeners").to_string(),
default_values_t = ["11010".to_string()],
num_args = 0..
)]
listeners: Vec<String>,
@@ -558,6 +557,13 @@ impl TryFrom<&Cli> for TomlConfigLoader {
.map(|s| s.parse().unwrap())
.collect(),
);
} else if cfg.get_listeners() == None {
cfg.set_listeners(
Cli::parse_listeners(false, vec!["11010".to_string()])?
.into_iter()
.map(|s| s.parse().unwrap())
.collect(),
);
}
if !cli.mapped_listeners.is_empty() {