mirror of
https://github.com/nushell/nushell.git
synced 2025-01-12 01:09:05 +01: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
@ -324,7 +324,7 @@ impl Value {
|
|||||||
pub fn as_filepath(&self) -> Result<PathBuf, ShellError> {
|
pub fn as_filepath(&self) -> Result<PathBuf, ShellError> {
|
||||||
match &self.value {
|
match &self.value {
|
||||||
UntaggedValue::Primitive(Primitive::FilePath(path)) => Ok(path.clone()),
|
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 New Issue
Block a user