mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
committed by
GitHub
parent
2538bc639f
commit
ed497d74c8
@@ -178,10 +178,13 @@ fn get_app<'a>(name: &str, about: Option<&'a String>, config: &'a CliConfig) ->
|
||||
}
|
||||
|
||||
fn get_arg<'a>(arg_name: &'a str, arg: &'a CliArg) -> Arg<'a> {
|
||||
let mut clap_arg = Arg::new(arg_name).long(arg_name);
|
||||
let mut clap_arg = Arg::new(arg_name);
|
||||
|
||||
if let Some(short) = arg.short {
|
||||
clap_arg = clap_arg.short(short);
|
||||
if arg.index.is_none() {
|
||||
clap_arg = clap_arg.long(arg_name);
|
||||
if let Some(short) = arg.short {
|
||||
clap_arg = clap_arg.short(short);
|
||||
}
|
||||
}
|
||||
|
||||
clap_arg = bind_string_arg!(arg, clap_arg, description, about);
|
||||
|
||||
@@ -48,11 +48,13 @@ A positional argument is identified by its position in the list of arguments. Wi
|
||||
"args": [
|
||||
{
|
||||
"name": "source",
|
||||
"index": 1
|
||||
"index": 1,
|
||||
"takesValue": true
|
||||
},
|
||||
{
|
||||
"name": "destination",
|
||||
"index": 2
|
||||
"index": 2,
|
||||
"takesValue": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user