Our own Helm Command/Resource/Executor #13
| @ -9,7 +9,7 @@ use temp_dir::{self, TempDir}; | ||||
| #[derive(Clone)] | ||||
| pub struct HelmCommandExecutor { | ||||
|     pub env: HashMap<String, String>, | ||||
|     pub path: PathBuf, | ||||
|     pub path: Option<PathBuf>, | ||||
|     pub args: Vec<String>, | ||||
|     pub api_versions: Option<Vec<String>>, | ||||
|     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() | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user