use match
This commit is contained in:
parent
4147691337
commit
d7b38ab6d2
@ -52,12 +52,14 @@ impl<T: Topology + HelmCommand> Interpret<T> for HelmChartInterpret {
|
||||
.as_ref()
|
||||
.unwrap_or_else(|| todo!("Get namespace from active kubernetes cluster"));
|
||||
|
||||
let mut yaml_path: Option<&Path> = None;
|
||||
let tf: TempFile;
|
||||
if self.score.values_yaml.is_some() {
|
||||
tf = temp_file::with_contents(self.score.values_yaml.as_ref().unwrap().as_bytes());
|
||||
yaml_path = Some(tf.path());
|
||||
}
|
||||
let yaml_path: Option<&Path> = match self.score.values_yaml.as_ref() {
|
||||
Some(yaml_str) => {
|
||||
tf = temp_file::with_contents(yaml_str.as_bytes());
|
||||
Some(tf.path())
|
||||
}
|
||||
None => None,
|
||||
};
|
||||
|
||||
let helm_executor = DefaultHelmExecutor::new();
|
||||
let res = helm_executor.install_or_upgrade(
|
||||
|
Loading…
Reference in New Issue
Block a user