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 -5
View File
@@ -933,11 +933,7 @@ impl RunCmd {
{
assert!(config.chain_spec.is_some(), "chain_spec must be present before continuing");
crate::update_config_for_running_node(
&mut config,
self,
&version,
)?;
crate::update_config_for_running_node(&mut config, self)?;
crate::run_node(config, new_light, new_full, &version)
}