From 408754e8fbe71854e2b62ad3fc72084794fd730f Mon Sep 17 00:00:00 2001 From: Omar Date: Tue, 4 Nov 2025 06:30:39 +0300 Subject: [PATCH] Remove the cwd setting from the export-chainspec command (#205) --- crates/core/src/lib.rs | 16 ++-------------- .../node/src/node_implementations/substrate.rs | 3 --- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/crates/core/src/lib.rs b/crates/core/src/lib.rs index 28f575c..12c8b1b 100644 --- a/crates/core/src/lib.rs +++ b/crates/core/src/lib.rs @@ -234,15 +234,9 @@ impl Platform for ReviveDevNodePolkavmResolcPlatform { .path .as_path(); let wallet = AsRef::::as_ref(&context).wallet(); - let working_directory = AsRef::::as_ref(&context).as_path(); let export_chainspec_command = SubstrateNode::REVIVE_DEV_NODE_EXPORT_CHAINSPEC_COMMAND; - SubstrateNode::node_genesis( - revive_dev_node_path, - export_chainspec_command, - &wallet, - working_directory, - ) + SubstrateNode::node_genesis(revive_dev_node_path, export_chainspec_command, &wallet) } } @@ -308,15 +302,9 @@ impl Platform for ReviveDevNodeRevmSolcPlatform { .path .as_path(); let wallet = AsRef::::as_ref(&context).wallet(); - let working_directory = AsRef::::as_ref(&context).as_path(); let export_chainspec_command = SubstrateNode::REVIVE_DEV_NODE_EXPORT_CHAINSPEC_COMMAND; - SubstrateNode::node_genesis( - revive_dev_node_path, - export_chainspec_command, - &wallet, - working_directory, - ) + SubstrateNode::node_genesis(revive_dev_node_path, export_chainspec_command, &wallet) } } diff --git a/crates/node/src/node_implementations/substrate.rs b/crates/node/src/node_implementations/substrate.rs index 278819a..787e6a5 100644 --- a/crates/node/src/node_implementations/substrate.rs +++ b/crates/node/src/node_implementations/substrate.rs @@ -160,7 +160,6 @@ impl SubstrateNode { &self.node_binary, &self.export_chainspec_command, &self.wallet, - self.base_directory.as_path(), ) .context("Failed to prepare the chainspec command")?; @@ -320,7 +319,6 @@ impl SubstrateNode { node_path: &Path, export_chainspec_command: &str, wallet: &EthereumWallet, - base_directory: impl AsRef, ) -> anyhow::Result { trace!("Exporting the chainspec"); let output = Command::new(node_path) @@ -328,7 +326,6 @@ impl SubstrateNode { .arg("--chain") .arg("dev") .env_remove("RUST_LOG") - .current_dir(base_directory) .output() .context("Failed to export the chain-spec")?;