fix(cli): Hide updater bundle target in help output (#12801)

ref https://github.com/tauri-apps/tauri/issues/3251#issuecomment-2677139820
This commit is contained in:
Fabian-Lars
2025-02-25 19:25:28 +01:00
committed by GitHub
parent d6520a21ce
commit c116dfcdee

View File

@@ -39,7 +39,13 @@ impl FromStr for BundleFormat {
impl ValueEnum for BundleFormat {
fn value_variants<'a>() -> &'a [Self] {
static VARIANTS: OnceLock<Vec<BundleFormat>> = OnceLock::new();
VARIANTS.get_or_init(|| PackageType::all().iter().map(|t| Self(*t)).collect())
VARIANTS.get_or_init(|| {
PackageType::all()
.iter()
.filter(|t| **t != PackageType::Updater)
.map(|t| Self(*t))
.collect()
})
}
fn to_possible_value(&self) -> Option<PossibleValue> {