Skip to content

Commit

Permalink
Merge pull request #26 from xTachyon/main
Browse files Browse the repository at this point in the history
Accept multiple paths in add
  • Loading branch information
shepmaster authored Sep 24, 2024
2 parents fd46842 + 51dcb08 commit 6ac7968
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ struct AddArgs {
registry: Option<PathBuf>,

#[argh(positional)]
path: PathBuf,
path: Vec<PathBuf>,
}

/// Remove a crate from the registry
Expand Down Expand Up @@ -329,7 +329,9 @@ enum DoInitializeError {
fn do_add(global: &Global, add: AddArgs) -> Result<(), Error> {
let r = discover_registry(add.registry)?;

r.add(global, &add.path)?;
for i in add.path {
r.add(global, i)?;
}
r.maybe_generate_html()?;

Ok(())
Expand Down

0 comments on commit 6ac7968

Please sign in to comment.