diff --git a/crates/nu-command/src/formats/from/csv.rs b/crates/nu-command/src/formats/from/csv.rs index 5072914f2..679d2d1e3 100644 --- a/crates/nu-command/src/formats/from/csv.rs +++ b/crates/nu-command/src/formats/from/csv.rs @@ -129,6 +129,13 @@ fn from_csv( input: PipelineData, ) -> Result { let name = call.head; + if let PipelineData::Value(Value::List { .. }, _) = input { + return Err(ShellError::TypeMismatch { + err_message: "received list stream, did you forget to open file with --raw flag?" + .into(), + span: name, + }); + } let separator = match call.get_flag::(engine_state, stack, "separator")? { Some(sep) => {