From 35f8d8548a6d3a2f2a24f3a7510098bee86507da Mon Sep 17 00:00:00 2001 From: 3lvir4 <128508160+3lvir4@users.noreply.github.com> Date: Wed, 16 Aug 2023 09:27:36 +0200 Subject: [PATCH] Remove potential panic from path join (#10012) Co-authored-by: amtoine --- crates/nu-command/src/path/join.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/nu-command/src/path/join.rs b/crates/nu-command/src/path/join.rs index 44a3a4ac5d..e16efe25f4 100644 --- a/crates/nu-command/src/path/join.rs +++ b/crates/nu-command/src/path/join.rs @@ -73,9 +73,7 @@ the output of 'path parse' and 'path split' subcommands."# "Input value cannot be joined".to_string(), "value originates from here".into(), head, - input - .span() - .expect("non-Empty non-ListStream PipelineData had no span"), + input.span().unwrap_or(call.head), )), } }