mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-14 21:21:44 +03:00
This commit is contained in:
parent
2c040eaadd
commit
f685df399a
6
.changes/fix-cli-multiple-values.md
Normal file
6
.changes/fix-cli-multiple-values.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"cli.rs": patch
|
||||
"cli.js": patch
|
||||
---
|
||||
|
||||
Fixes multiple occurrences handling of the `bundles` and `features` arguments.
|
@ -32,11 +32,11 @@ pub struct Options {
|
||||
/// Note that compiling an universal macOS application requires both `aarch64-apple-darwin` and `x86_64-apple-darwin` targets to be installed.
|
||||
#[clap(short, long)]
|
||||
target: Option<String>,
|
||||
/// List of cargo features to activate
|
||||
#[clap(short, long)]
|
||||
/// Space or comma separated list of features to activate
|
||||
#[clap(short, long, multiple_occurrences(true), multiple_values(true))]
|
||||
features: Option<Vec<String>>,
|
||||
/// List of bundles to package
|
||||
#[clap(short, long)]
|
||||
/// Space or comma separated list of bundles to package
|
||||
#[clap(short, long, multiple_occurrences(true), multiple_values(true))]
|
||||
bundles: Option<Vec<String>>,
|
||||
/// JSON string or path to JSON file to merge with tauri.conf.json
|
||||
#[clap(short, long)]
|
||||
@ -242,7 +242,10 @@ pub fn command(options: Options) -> Result<()> {
|
||||
if config_.tauri.bundle.active {
|
||||
let package_types = if let Some(names) = options.bundles {
|
||||
let mut types = vec![];
|
||||
for name in names {
|
||||
for name in names
|
||||
.into_iter()
|
||||
.flat_map(|n| n.split(',').map(|s| s.to_string()).collect::<Vec<String>>())
|
||||
{
|
||||
if name == "none" {
|
||||
break;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ pub struct Options {
|
||||
#[clap(short, long)]
|
||||
target: Option<String>,
|
||||
/// List of cargo features to activate
|
||||
#[clap(short, long)]
|
||||
#[clap(short, long, multiple_occurrences(true), multiple_values(true))]
|
||||
features: Option<Vec<String>>,
|
||||
/// Exit on panic
|
||||
#[clap(short, long)]
|
||||
|
Loading…
Reference in New Issue
Block a user