mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 09:21:05 +00:00
Do not pollute global base path with export genesis/wasm (#2487)
Otherwise the user may runs into weird errors if there is already a db.
This commit is contained in:
@@ -215,6 +215,13 @@ impl sc_cli::CliConfiguration for ExportGenesisStateCommand {
|
||||
fn shared_params(&self) -> &sc_cli::SharedParams {
|
||||
&self.shared_params
|
||||
}
|
||||
|
||||
fn base_path(&self) -> sc_cli::Result<Option<BasePath>> {
|
||||
// As we are just exporting the genesis wasm a tmp database is enough.
|
||||
//
|
||||
// As otherwise we may "pollute" the global base path.
|
||||
Ok(Some(BasePath::new_temp_dir()?))
|
||||
}
|
||||
}
|
||||
|
||||
/// Command for exporting the genesis wasm file.
|
||||
@@ -266,6 +273,13 @@ impl sc_cli::CliConfiguration for ExportGenesisWasmCommand {
|
||||
fn shared_params(&self) -> &sc_cli::SharedParams {
|
||||
&self.shared_params
|
||||
}
|
||||
|
||||
fn base_path(&self) -> sc_cli::Result<Option<BasePath>> {
|
||||
// As we are just exporting the genesis wasm a tmp database is enough.
|
||||
//
|
||||
// As otherwise we may "pollute" the global base path.
|
||||
Ok(Some(BasePath::new_temp_dir()?))
|
||||
}
|
||||
}
|
||||
|
||||
fn validate_relay_chain_url(arg: &str) -> Result<Url, String> {
|
||||
|
||||
Reference in New Issue
Block a user