Skip to content

Commit e6e332c

Browse files
authored
Merge pull request #19 from golemcloud/integ-fixes
WIT copy fix for CLI integration
2 parents e37cc62 + b6c54db commit e6e332c

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

crates/wasm-rquickjs/skeleton/src/internal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ where
268268
match e {
269269
Error::Exception => {
270270
let exception = ctx.catch();
271-
panic! ("Exception during awaiting call result: {exception:?}")
271+
panic! ("Exception during awaiting call result for {function_path}: {exception:?}", function_path=function_path.join("."))
272272
}
273273
_ => {
274274
panic ! ("Error during awaiting call result: {e:?}")

crates/wasm-rquickjs/src/lib.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -265,13 +265,10 @@ impl<'a> ImportedInterface<'a> {
265265

266266
/// Recursively copies a WIT directory to `<output>/wit`.
267267
fn copy_wit_directory(wit: &Utf8Path, output: &Utf8Path) -> anyhow::Result<()> {
268-
let options = CopyOptions {
269-
overwrite: true,
270-
copy_inside: true,
271-
..Default::default()
272-
};
273-
274-
fs_extra::copy_items(&[wit], output, &options).context("Failed to copy WIT directory")?;
268+
fs_extra::dir::create(output, true)
269+
.context("Failed to create and erase output WIT directory")?;
270+
fs_extra::dir::copy(wit, output, &CopyOptions::new().content_only(true))
271+
.context("Failed to copy WIT directory")?;
275272

276273
Ok(())
277274
}

0 commit comments

Comments
 (0)