Skip to content
Snippets Groups Projects
Commit ef142722 authored by Xiliang Chen's avatar Xiliang Chen Committed by Bastian Köcher
Browse files

Pass RunCmd to user (#2425)

parent 6be7eee7
Branches
No related merge requests found
......@@ -201,7 +201,7 @@ where
CC: StructOpt + Clone + GetLogFilter,
RP: StructOpt + Clone + AugmentClap,
E: IntoExit,
RS: FnOnce(E, RP, FactoryFullConfiguration<F>) -> Result<(), String>,
RS: FnOnce(E, RunCmd, RP, FactoryFullConfiguration<F>) -> Result<(), String>,
I: IntoIterator<Item = T>,
T: Into<std::ffi::OsString> + Clone,
{
......@@ -516,11 +516,11 @@ where
F: ServiceFactory,
E: IntoExit,
S: FnOnce(&str) -> Result<Option<ChainSpec<FactoryGenesis<F>>>, String>,
RS: FnOnce(E, RP, FactoryFullConfiguration<F>) -> Result<(), String>,
RS: FnOnce(E, RunCmd, RP, FactoryFullConfiguration<F>) -> Result<(), String>,
{
let config = create_run_node_config::<F, _>(cli.left, spec_factory, impl_name, version)?;
let config = create_run_node_config::<F, _>(cli.left.clone(), spec_factory, impl_name, version)?;
run_service(exit, cli.right, config).map_err(Into::into)
run_service(exit, cli.left, cli.right, config).map_err(Into::into)
}
//
......
......@@ -17,7 +17,7 @@ pub fn run<I, T, E>(args: I, exit: E, version: VersionInfo) -> error::Result<()>
{
parse_and_execute::<service::Factory, NoCustom, NoCustom, _, _, _, _, _>(
load_spec, &version, "substrate-node", args, exit,
|exit, _custom_args, config| {
|exit, _cli_args, _custom_args, config| {
info!("{}", version.name);
info!(" version {}", config.full_version());
info!(" by {}, 2017, 2018", version.author);
......
......@@ -80,7 +80,7 @@ pub fn run<I, T, E>(args: I, exit: E, version: cli::VersionInfo) -> error::Resul
{
cli::parse_and_execute::<service::Factory, NoCustom, NoCustom, _, _, _, _, _>(
load_spec, &version, "substrate-node", args, exit,
|exit, _custom_args, config| {
|exit, _cli_args, _custom_args, config| {
info!("{}", version.name);
info!(" version {}", config.full_version());
info!(" by Parity Technologies, 2017-2019");
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment