diff --git a/src/modes/status.rs b/src/modes/status.rs index e3949e9..99a1fae 100644 --- a/src/modes/status.rs +++ b/src/modes/status.rs @@ -159,29 +159,33 @@ fn build_config_table(settings: &config::Settings) -> Table { all_options.insert(key.clone(), value.clone()); } - // Add options - if !all_options.is_empty() { - let options_str = serde_yaml::to_string(&all_options) + // Always add options section + let options_str = if all_options.is_empty() { + "{}".to_string() + } else { + serde_yaml::to_string(&all_options) .unwrap_or_else(|_| "Unable to serialize options".to_string()) .trim() - .to_string(); - config_table.add_row(Row::new(vec![ - Cell::new(" Options"), - Cell::new(&options_str), - ])); - } + .to_string() + }; + config_table.add_row(Row::new(vec![ + Cell::new(" Options"), + Cell::new(&options_str), + ])); - // Add outputs if they exist - if !plugin_config.outputs.is_empty() { - let outputs_str = serde_yaml::to_string(&plugin_config.outputs) + // Always add outputs section + let outputs_str = if plugin_config.outputs.is_empty() { + "{}".to_string() + } else { + serde_yaml::to_string(&plugin_config.outputs) .unwrap_or_else(|_| "Unable to serialize outputs".to_string()) .trim() - .to_string(); - config_table.add_row(Row::new(vec![ - Cell::new(" Outputs"), - Cell::new(&outputs_str), - ])); - } + .to_string() + }; + config_table.add_row(Row::new(vec![ + Cell::new(" Outputs"), + Cell::new(&outputs_str), + ])); } }