From 3364b6727c189f59a948d69ee6a5cf756bf0da38 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Sat, 3 Feb 2024 09:14:02 -0300 Subject: [PATCH] fix(cli): build command `features` and `bundles` can have multiple values (#8744) * fix(cli): build command and can have multiple values * add value delimiter on bundles * gitignore dist --- examples/api/.gitignore | 1 + tooling/cli/src/build.rs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/api/.gitignore b/examples/api/.gitignore index 452256283..f04ed4ef4 100644 --- a/examples/api/.gitignore +++ b/examples/api/.gitignore @@ -3,3 +3,4 @@ .DS_Store gen/ .cargo +dist/ diff --git a/tooling/cli/src/build.rs b/tooling/cli/src/build.rs index cead55c4d..ea8b518c4 100644 --- a/tooling/cli/src/build.rs +++ b/tooling/cli/src/build.rs @@ -15,7 +15,7 @@ use crate::{ }; use anyhow::{bail, Context}; use base64::Engine; -use clap::Parser; +use clap::{ArgAction, Parser}; use log::{debug, error, info, warn}; use std::{ env::{set_current_dir, var_os}, @@ -46,7 +46,7 @@ pub struct Options { #[clap(short, long)] pub target: Option, /// Space or comma separated list of features to activate - #[clap(short, long, value_delimiter = ',')] + #[clap(short, long, action = ArgAction::Append, num_args(0..))] pub features: Option>, /// Space or comma separated list of bundles to package. /// @@ -54,7 +54,7 @@ pub struct Options { /// If `none` is specified, the bundler will be skipped. /// /// Note that the `updater` bundle is not automatically added so you must specify it if the updater is enabled. - #[clap(short, long, value_delimiter = ',')] + #[clap(short, long, action = ArgAction::Append, num_args(0..), value_delimiter = ',')] pub bundles: Option>, /// JSON string or path to JSON file to merge with tauri.conf.json #[clap(short, long)]