Change package search and caching path

Brings local packages in line with changes to the package repository. See also: https://github.com/typst/packages/issues/61
This commit is contained in:
Laurenz 2023-08-01 00:55:54 +02:00
parent 66df130ca4
commit 1c7105ba82

View File

@ -12,7 +12,7 @@ use super::color_stream;
/// Make a package available in the on-disk cache.
pub fn prepare_package(spec: &PackageSpec) -> PackageResult<PathBuf> {
let subdir =
format!("typst/packages/{}/{}-{}", spec.namespace, spec.name, spec.version);
format!("typst/packages/{}/{}/{}", spec.namespace, spec.name, spec.version);
if let Some(data_dir) = dirs::data_dir() {
let dir = data_dir.join(&subdir);