Skip to content

Commit

Permalink
Fix: wrong paths generated for @local/@preview packages (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
theofabilous authored Oct 17, 2023
1 parent 17f4473 commit faee30b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion compiler/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ impl SystemWorld {
.js_request_data
.call1(
&JsValue::NULL,
&format!("@{}/{}-{}", spec.namespace, spec.name, spec.version).into(),
&format!("@{}/{}/{}", spec.namespace, spec.name, spec.version).into(),
)
.map_err(f)?
.as_string()
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,12 @@ export default class TypstPlugin extends Plugin {
spec = spec.slice(1)
let subdir = "/typst/packages/" + spec

let dir = normalizePath(this.getDataDir() + subdir)
let dir = require('path').normalize(this.getDataDir() + subdir)
if (this.fs.existsSync(dir)) {
return dir
}

dir = normalizePath(this.getCacheDir() + subdir)
dir = require('path').normalize(this.getCacheDir() + subdir)

if (this.fs.existsSync(dir)) {
return dir
Expand Down

0 comments on commit faee30b

Please sign in to comment.