diff options
| author | Florent Michel <56166507+FlorentCLMichel@users.noreply.github.com> | 2024-08-11 21:16:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-11 20:16:40 +0000 |
| commit | 70931ac1f6f68f013e25fe5437e23ad148ce23e1 (patch) | |
| tree | c3399d64683c8c25c133bbdd8781a3edd8d1a06e /crates/typst-kit/src | |
| parent | d06f3f180cd06d11f45c439180027f57287f4f84 (diff) | |
Fix crash when local package is missing and make OpenSSL optional in typst-kit (#4720)
Diffstat (limited to 'crates/typst-kit/src')
| -rw-r--r-- | crates/typst-kit/src/package.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/typst-kit/src/package.rs b/crates/typst-kit/src/package.rs index ad69df01..3c9e6529 100644 --- a/crates/typst-kit/src/package.rs +++ b/crates/typst-kit/src/package.rs @@ -85,9 +85,11 @@ impl PackageStorage { } // Download from network if it doesn't exist yet. - self.download_package(spec, &dir, progress)?; - if dir.exists() { - return Ok(dir); + if spec.namespace == "preview" { + self.download_package(spec, &dir, progress)?; + if dir.exists() { + return Ok(dir); + } } } |
