Skip to content

Conversation

@chikoski
Copy link

This PR is a fix for issue #118. With this fix, the get command creates the directory specified by the -o option if the specified directory does not exist.

For example, the following command creates the wit directory and saves the wasi:[email protected] in it:

$ wkg get -o wit/ wasi:http0.2.0

Copy link
Collaborator

@thomastaylor312 thomastaylor312 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this! Just one small change needed

@@ -1,4 +1,4 @@
use std::{io::Seek, path::PathBuf};
use std::{fs, io::Seek, path::PathBuf};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please swap out to use tokio::fs since the function is an async one?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for my delayed response. Updated the code as suggest.

Note: the CI is failed as wasm32-wasi is not available now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants