From 933da11e8f0ea315dc99f849255f9888391d2b07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 13 Oct 2025 10:05:54 +0100 Subject: [PATCH] bugfix: include network name in the default gateway probe config path (#6100) --- nym-gateway-probe/src/run.rs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/nym-gateway-probe/src/run.rs b/nym-gateway-probe/src/run.rs index 886ba7635b..9487b10905 100644 --- a/nym-gateway-probe/src/run.rs +++ b/nym-gateway-probe/src/run.rs @@ -7,6 +7,7 @@ use nym_config::defaults::setup_env; use nym_gateway_probe::nodes::NymApiDirectory; use nym_gateway_probe::{CredentialArgs, NetstackArgs, ProbeResult, TestedNode}; use nym_sdk::mixnet::NodeIdentity; +use std::path::Path; use std::{path::PathBuf, sync::OnceLock}; use tracing::*; @@ -69,6 +70,8 @@ struct CliArgs { credential_args: CredentialArgs, } +const DEFAULT_CONFIG_DIR: &str = "/tmp/nym-gateway-probe/config/"; + #[derive(Subcommand, Debug)] enum Commands { /// Run the probe locally @@ -77,8 +80,8 @@ enum Commands { #[arg(long)] mnemonic: String, - #[arg(long, default_value = "/tmp/nym-gateway-probe/config/")] - config_dir: PathBuf, + #[arg(long)] + config_dir: Option, }, } @@ -144,8 +147,17 @@ pub(crate) async fn run() -> anyhow::Result { mnemonic, config_dir, }) => { + let config_dir = config_dir + .clone() + .unwrap_or_else(|| Path::new(DEFAULT_CONFIG_DIR).join(&network.network_name)); + + info!( + "using the following directory for the probe config: {}", + config_dir.display() + ); + Box::pin(trial.probe_run_locally( - config_dir, + &config_dir, mnemonic, directory, nyxd_url,