From dbecbdccd4eaeca9bea33fac1bc8d9ea3000c3d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BD=C3=A1dn=C3=ADk?= Date: Mon, 12 Apr 2021 02:53:31 +0300 Subject: [PATCH] Fix type error when Value is viewed as file path (#3305) I believe this should be "path", not "string". --- crates/nu-protocol/src/value.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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())), } }