diff --git a/src/data/base.rs b/src/data/base.rs index 2cf1f2cedb..bc567f0dfe 100644 --- a/src/data/base.rs +++ b/src/data/base.rs @@ -817,6 +817,7 @@ impl Tagged { pub(crate) fn as_path(&self) -> Result { match self.item() { Value::Primitive(Primitive::Path(path)) => Ok(path.clone()), + Value::Primitive(Primitive::String(path_str)) => Ok(PathBuf::from(&path_str).clone()), other => Err(ShellError::type_error( "Path", other.type_name().tagged(self.tag()),