-
the code is: Command::new("sea-orm-cli")
.version(env!("CARGO_PKG_VERSION"))
.subcommand(entity_subcommand)
.subcommand(migrate_subcommands)
.arg(
Arg::new("VERBOSE")
.long("verbose")
.short('v')
.help("Show debug messages")
.takes_value(false)
.global(true),
)
.setting(AppSettings::SubcommandRequiredElseHelp) the migration guide and list of breaking changes lists:
I did: Command::new("sea-orm-cli")
.version(env!("CARGO_PKG_VERSION"))
.subcommand(entity_subcommand)
.subcommand(migrate_subcommands)
.arg(
Arg::new("VERBOSE")
.long("verbose")
.short('v')
.help("Show debug messages")
.takes_value(false)
.global(true),
)
.setting(Command::subcommand_required(true).arg_required_else_help(true)); what is my mistake? |
Beta Was this translation helpful? Give feedback.
Answered by
epage
Apr 9, 2022
Replies: 1 comment
-
Note that it is describing functions on Command::new("sea-orm-cli")
.version(env!("CARGO_PKG_VERSION"))
.subcommand(entity_subcommand)
.subcommand(migrate_subcommands)
.arg(
Arg::new("VERBOSE")
.long("verbose")
.short('v')
.help("Show debug messages")
.takes_value(false)
.global(true),
)
.subcommand_required(true).arg_required_else_help(true); Something else that can help is to search the repo for examples |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
igotfr
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note that it is describing functions on
Command
which most likely will operate on an instance You can double check in the docs that these are chained methods, likeversion
, giving you:Something else that can help is to search the repo for examples