diff --git a/crates/nu-protocol/src/value.rs b/crates/nu-protocol/src/value.rs index 8e6d494aaa..7dc035926c 100644 --- a/crates/nu-protocol/src/value.rs +++ b/crates/nu-protocol/src/value.rs @@ -324,7 +324,7 @@ impl Value { pub fn as_filepath(&self) -> Result { match &self.value { UntaggedValue::Primitive(Primitive::FilePath(path)) => Ok(path.clone()), - _ => Err(ShellError::type_error("string", self.spanned_type_name())), + _ => Err(ShellError::type_error("path", self.spanned_type_name())), } }