Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create the output directory if it does not exist (#118) #141

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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?

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