Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
drknzz committed Jun 11, 2024
1 parent 90f44f1 commit 329b9b4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions extensions/scarb-doc/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ mod types;
struct Args {
#[command(flatten)]
packages_filter: PackagesFilter,

/// Generate the documentation.
#[arg(long)]
save: bool,
}

macro_rules! print_names {
Expand Down Expand Up @@ -53,9 +57,11 @@ fn main() -> Result<()> {

print_module(&crate_.root_module);

let path = PathBuf::from(crate_.root_module.name.as_str());
let doc_path = PathBuf::from("doc").join(path);
crate_.root_module.save_to_file_recursive(&doc_path)?;
if args.save {
let path = PathBuf::from(crate_.root_module.name.as_str());
let doc_path = PathBuf::from("doc").join(path);
crate_.root_module.save_to_file_recursive(&doc_path)?;
}

Ok(())
}
Expand Down

0 comments on commit 329b9b4

Please sign in to comment.