feat(cli): show yanked binary variants in listings
This commit is contained in:
1 parent
4e5bdab8cd
commit
349ec257f5
8 files changed
+44
-11
No files matched your search
@@ -450,7 +450,7 @@ publish_binary_variant(const BinaryPublishOptions &options) {
|
||||
|
||||
Void::Result::Result<std::vector<BinaryReleaseInfo>, Void::Result::Error>
|
||||
fetch_binary_variants(std::string_view registry_url, std::string_view package_name,
|
||||
std::string_view version, const RegistryAuth &auth) {
|
||||
std::string_view version, const RegistryAuth &auth, bool include_yanked) {
|
||||
auto parsed_url = parse_registry_url(registry_url);
|
||||
if (!parsed_url) {
|
||||
return std::unexpected{parsed_url.error()};
|
||||
@@ -519,8 +519,9 @@ fetch_binary_variants(std::string_view registry_url, std::string_view package_na
|
||||
if (const auto key = get_str(*bo, "public_key"); !key.empty()) {
|
||||
info.public_key = key;
|
||||
}
|
||||
// Yanked variants stay listed but must never be selected for materialization.
|
||||
if (!info.variant_id.empty() && !info.yanked) {
|
||||
// Yanked variants are hidden by default so they are never selected for
|
||||
// materialization; listing callers can opt in for inspection.
|
||||
if (!info.variant_id.empty() && (include_yanked || !info.yanked)) {
|
||||
variants.push_back(std::move(info));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user