From 3987688394453491e1f07528c07922d8d9d255ef Mon Sep 17 00:00:00 2001 From: ByeongSu Hong Date: Mon, 20 Nov 2023 23:46:46 +0700 Subject: [PATCH] fix: use metricsport (#2925) ### Description ### Drive-by changes ### Related issues ### Backward compatibility ### Testing --- rust/utils/run-locally/src/cosmos/mod.rs | 2 +- rust/utils/run-locally/src/cosmos/utils.rs | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/rust/utils/run-locally/src/cosmos/mod.rs b/rust/utils/run-locally/src/cosmos/mod.rs index 01e3864edc..4a25053027 100644 --- a/rust/utils/run-locally/src/cosmos/mod.rs +++ b/rust/utils/run-locally/src/cosmos/mod.rs @@ -259,7 +259,7 @@ fn launch_cosmos_validator( .hyp_env("ORIGINCHAINNAME", agent_config.name) .hyp_env("REORGPERIOD", "100") .hyp_env("DB", validator_base_db.to_str().unwrap()) - .hyp_env("METRICS", agent_config.domain_id.to_string()) + .hyp_env("METRICSPORT", agent_config.domain_id.to_string()) .hyp_env("VALIDATOR_SIGNER_TYPE", agent_config.signer.typ) .hyp_env("VALIDATOR_KEY", agent_config.signer.key.clone()) .hyp_env("VALIDATOR_PREFIX", "osmo") diff --git a/rust/utils/run-locally/src/cosmos/utils.rs b/rust/utils/run-locally/src/cosmos/utils.rs index 759038d09d..07800b3c8f 100644 --- a/rust/utils/run-locally/src/cosmos/utils.rs +++ b/rust/utils/run-locally/src/cosmos/utils.rs @@ -6,15 +6,17 @@ use crate::program::Program; use crate::utils::TaskHandle; pub(crate) fn sed(from: &str, to: &str, file: &str) { - Program::new("sed") - .raw_arg("-i") - // Temporary fix to get `sed` working on linux - // Note that this breaks the script on mac - // .cmd("") + let mut program = Program::new("sed").raw_arg("-i"); + + if cfg!(target_os = "macos") { + program = program.cmd(""); + } + + program .cmd(format!("s/{from}/{to}/g")) .cmd(file) .run() - .join(); + .join() } pub(crate) fn untar(output: &str, dir: &str) {