From 219757c081b1321f9399433eca88dbd504e79f67 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 14 May 2025 23:11:14 -0400 Subject: [PATCH] WIP --- harmony/src/modules/helm/command.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/harmony/src/modules/helm/command.rs b/harmony/src/modules/helm/command.rs index 618f4a3..4978b7a 100644 --- a/harmony/src/modules/helm/command.rs +++ b/harmony/src/modules/helm/command.rs @@ -9,7 +9,7 @@ use temp_dir::{self, TempDir}; #[derive(Clone)] pub struct HelmCommandExecutor { pub env: HashMap, - pub path: PathBuf, + pub path: Option, pub args: Vec, pub api_versions: Option>, pub kube_version: String, @@ -91,6 +91,12 @@ impl HelmCommandExecutor { } } + let path = if let Some(p) = self.path { + p + } else { + PathBuf::from("helm") + }; + let config_home = match self.globals.config_home { Some(p) => p, None => PathBuf::from(TempDir::new()?.path()), @@ -109,7 +115,7 @@ impl HelmCommandExecutor { config_home.to_str().unwrap().to_string(), ); - Command::new(self.path).envs(self.env).args(args).output() + Command::new(path).envs(self.env).args(args).output() } }