Skip to content

Commit 6ac7968

Browse files
authored
Merge pull request #26 from xTachyon/main
Accept multiple paths in add
2 parents fd46842 + 51dcb08 commit 6ac7968

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ struct AddArgs {
7272
registry: Option<PathBuf>,
7373

7474
#[argh(positional)]
75-
path: PathBuf,
75+
path: Vec<PathBuf>,
7676
}
7777

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

332-
r.add(global, &add.path)?;
332+
for i in add.path {
333+
r.add(global, i)?;
334+
}
333335
r.maybe_generate_html()?;
334336

335337
Ok(())

0 commit comments

Comments
 (0)