diff --git a/crates/nu_plugin_formats/src/from/ini.rs b/crates/nu_plugin_formats/src/from/ini.rs index 03c5a36ec0..3c09934f1f 100644 --- a/crates/nu_plugin_formats/src/from/ini.rs +++ b/crates/nu_plugin_formats/src/from/ini.rs @@ -24,7 +24,10 @@ pub fn from_ini_call(call: &EvaluatedCall, input: &Value) -> Result { - sections.push(String::new()); + // Section (None) allows for key value pairs without a section + if !properties.is_empty() { + sections.push(String::new()); + } } } @@ -38,11 +41,14 @@ pub fn from_ini_call(call: &EvaluatedCall, input: &Value) -> Result