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
|
SECRET_RE
|
||||||
.replace_all(line, |caps: &fancy_regex::Captures<'_>| {
|
.replace_all(line, |caps: &fancy_regex::Captures<'_>| {
|
||||||
|
if fatal_error.is_some() {
|
||||||
|
return String::new();
|
||||||
|
}
|
||||||
|
|
||||||
let name = caps[1].trim();
|
let name = caps[1].trim();
|
||||||
match vault.get_secret(name, false) {
|
match vault.get_secret(name, false) {
|
||||||
Ok(s) => s,
|
Ok(s) => s,
|
||||||
|
|||||||
Reference in New Issue
Block a user