Skip to content

Commit

Permalink
fix: std not being copied in "dir" mode
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmasoldi3r committed Dec 3, 2023
1 parent a90e133 commit 47bd4b4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion janus/src/compilation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl CompilationHost {
}
}
OutputFormat::Directory => {
let pb = get_bar(objects.len() as u64);
let pb = get_bar(objects.len() as u64 + 1);
for entry in objects.iter() {
let base_target = entry.strip_prefix(&objects_base_path).unwrap();
let target = target_base_path.join(base_target);
Expand All @@ -145,6 +145,13 @@ impl CompilationHost {
fs::copy(entry, target).unwrap();
pb.inc(1);
}
fs::write(
target_base_path.join("std.lua"),
fs::read_to_string(objects_base_path.join("std.lua"))
.unwrap()
.as_bytes(),
)
.unwrap();
pb.finish_with_message("Done");
}
OutputFormat::FlatDirectory => todo!("Directory flattening"),
Expand Down

0 comments on commit 47bd4b4

Please sign in to comment.