mirror of
https://github.com/nushell/nushell
synced 2024-12-28 14:03:09 +00:00
Fix type error when Value is viewed as file path (#3305)
I believe this should be "path", not "string".
This commit is contained in:
parent
734877338d
commit
dbecbdccd4
1 changed files with 1 additions and 1 deletions
|
@ -324,7 +324,7 @@ impl Value {
|
|||
pub fn as_filepath(&self) -> Result<PathBuf, ShellError> {
|
||||
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())),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue