Skip to content

Commit

Permalink
Read a string, then convert it to a PathBuf
Browse files Browse the repository at this point in the history
Fixes #31
  • Loading branch information
badboy committed Dec 19, 2022
1 parent 33f710c commit 60011cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bin/mdbook-mermaid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ fn handle_supports(sub_args: &ArgMatches) -> ! {

fn handle_install(sub_args: &ArgMatches) -> ! {
let proj_dir = sub_args
.get_one::<PathBuf>("dir")
.get_one::<String>("dir")
.expect("Required argument");
let proj_dir = PathBuf::from(proj_dir);
let config = proj_dir.join("book.toml");

if !config.exists() {
Expand Down

0 comments on commit 60011cf

Please sign in to comment.