Fix type error when Value is viewed as file path (#3305)

I believe this should be "path", not "string".
This commit is contained in:
Jakub Žádník 2021-04-12 02:53:31 +03:00 committed by GitHub
parent 734877338d
commit dbecbdccd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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())),
}
}