Skip to content

Commit

Permalink
feat(cli): allow to filter datasets by shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-aksamentov committed Dec 7, 2023
1 parent 86e06c3 commit c4b71eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages_rs/nextclade-cli/src/cli/nextclade_dataset_get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub fn dataset_http_get(http: &mut HttpClient, name: impl AsRef<str>, tag: &Opti
})
// Filter by name
.filter(|dataset| {
dataset.path == name
dataset.path == name || dataset.shortcuts.contains(&String::from(name))
})
.collect_vec();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub fn nextclade_dataset_list(
})
.filter(|dataset| {
if let Some(name) = &name {
name == &dataset.path
name == &dataset.path || dataset.shortcuts.contains(name)
} else {
true
}
Expand Down

0 comments on commit c4b71eb

Please sign in to comment.