Fix CLI setup again (#4851)

* Fix CLI setup again

We need to set `config_dir` and `database_path` for almost every
command.
This fixes `purge-chain` and also adds a test to make sure we don't
break it again.

* Adds missing test files

* Split methods
This commit is contained in:
Bastian Köcher
2020-02-07 15:00:51 +01:00
committed by GitHub
parent 60bd49ff0d
commit ec562fe937
6 changed files with 144 additions and 52 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ where
),
Some(Subcommand::Factory(cli_args)) => {
sc_cli::init(&cli_args.shared_params, &version)?;
sc_cli::load_spec(&mut config, &cli_args.shared_params, load_spec)?;
sc_cli::init_config(&mut config, &cli_args.shared_params, &version, load_spec)?;
sc_cli::fill_import_params(
&mut config,
&cli_args.import_params,