Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions orion-configuration/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,16 @@ mod envoy_conversions {
let serialized = serde_yaml::to_string(&new_conf)?;
tracing::info!("\n{serialized}\n");
if !path.ends_with("new.yaml") {
let new_path = format!(
"../orion-proxy/conf/{}-new.yaml",
let temp_dir = std::env::temp_dir();
let new_path = temp_dir.join(format!(
"{}-new.yaml",
path.file_name()
.unwrap()
.expect("path should have a file name")
.to_str()
.unwrap()
.expect("file name should be valid UTF-8")
.trim_end_matches(".yaml")
.replace("envoy-", "orion-")
);
));
std::fs::write(new_path, serialized.as_bytes())?;
}
let deserialized: Config = serde_yaml::from_str(&serialized)?;
Expand Down
Loading