Cleanup the cli interface (#1194)

Parameters like `--dev`, `--base-path` or `--chain` were replicated
for each subcommand and were also present in the "top". This pr removes
these parameters from the subcommands.
The subcommands also ignored stuff like `--dev` as it was only read in
the top matcher, that did not look into the subcommand matchers.
Now, if you specify one of the parameters for a subcommand, you will get
an error instead of silently ignoring it.
This commit is contained in:
Bastian Köcher
2018-12-03 10:16:06 +01:00
committed by GitHub
parent af918ce556
commit 69a288e586
3 changed files with 70 additions and 117 deletions
+3 -1
View File
@@ -122,7 +122,9 @@ pub fn run<I, T, E>(args: I, exit: E, version: cli::VersionInfo) -> error::Resul
Err(e) => e.exit(),
};
let (spec, mut config) = cli::parse_matches::<service::Factory, _>(load_spec, version, "substrate-node", &matches)?;
let (spec, mut config) = cli::parse_matches::<service::Factory, _>(
load_spec, version, "substrate-node", &matches
)?;
if matches.is_present("grandpa_authority_only") {
config.custom.grandpa_authority = true;