mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-13 21:19:05 +01:00
fix(CLI): gate usage of upload_media_params
Previously the local stack variable would be used even though it wasn't initialized as there were no upload flags. Now this only happens if there are media params. [skip ci]
This commit is contained in:
@@ -287,6 +287,7 @@ for &(main_command_name, ref about, ref subcommands) in arg_data.iter() {
|
||||
if let &Some(multi) = multi {
|
||||
arg = arg.multiple(multi);
|
||||
}
|
||||
% if have_media_params:
|
||||
if arg_name_str == "${MODE_ARG}" {
|
||||
arg = arg.number_of_values(2);
|
||||
arg = arg.value_names(&upload_value_names);
|
||||
@@ -298,6 +299,7 @@ for &(main_command_name, ref about, ref subcommands) in arg_data.iter() {
|
||||
.help("The file's mime time, like 'application/octet-stream'")
|
||||
.takes_value(true));
|
||||
}
|
||||
% endif
|
||||
scmd = scmd.arg(arg);
|
||||
}
|
||||
mcmd = mcmd.subcommand(scmd);
|
||||
|
||||
Reference in New Issue
Block a user