Skip to content

Commit

Permalink
fix(cli): correct path_to_root (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Myriad-Dreamin authored Aug 17, 2023
1 parent 598b17e commit 166c3a5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cli/src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ impl Project {
let mut final_dest_dir = args.dest_dir.clone();
let path_to_root = args.path_to_root.clone();

if !path_to_root.ends_with('/') {
args.path_to_root.push('/');
}

if args.workspace.is_empty() {
args.workspace = args.dir.clone();
}
Expand Down Expand Up @@ -169,7 +173,7 @@ impl Project {
}

pub fn compile_chapter(&mut self, _ch: DataDict, path: &str) -> Result<String, String> {
let renderer_module = format!("{}/renderer/typst_ts_renderer_bg.wasm", self.path_to_root);
let renderer_module = format!("{}renderer/typst_ts_renderer_bg.wasm", self.path_to_root);
let rel_data_path = std::path::Path::new(&self.path_to_root)
.join(path)
.with_extension("")
Expand Down

0 comments on commit 166c3a5

Please sign in to comment.