fix: stop interpolating a line if any errors occur
This commit is contained in:
@@ -364,6 +364,10 @@ pub fn interpolate_secrets(content: &str, vault: &Vault) -> Result<(String, Vec<
|
||||
|
||||
SECRET_RE
|
||||
.replace_all(line, |caps: &fancy_regex::Captures<'_>| {
|
||||
if fatal_error.is_some() {
|
||||
return String::new();
|
||||
}
|
||||
|
||||
let name = caps[1].trim();
|
||||
match vault.get_secret(name, false) {
|
||||
Ok(s) => s,
|
||||
|
||||
Reference in New Issue
Block a user