aboutsummaryrefslogtreecommitdiffstats
path: root/src/config/mod.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-26 23:09:51 +0100
committertv <tv@krebsco.de>2026-10-26 23:09:51 +0100
commit9240aa8c54b8e7855c144d1ed8a37cda947e6ae2 (patch)
tree26d8143a83a422246a323511aa46a1b89f735c17 /src/config/mod.rs
parent566778658a096d265f86db43602e089182a939fc (diff)
allow placeholders everywhere in config
Diffstat (limited to 'src/config/mod.rs')
-rw-r--r--src/config/mod.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs
index c8bfa9f..fd8547d 100644
--- a/src/config/mod.rs
+++ b/src/config/mod.rs
@@ -662,6 +662,13 @@ fn resolve_file_value(
)),
None => bail!("a table here must be an importer (env, file or command)"),
},
+ JsonValue::String(text) => match import::interpolated(&text, Some(dir)) {
+ Some(importer) => Ok((
+ from_import(spec.kind, &importer)?,
+ vec![importer.describe()],
+ )),
+ None => Ok((JsonValue::String(text), Vec::new())),
+ },
JsonValue::Array(items) if spec.kind == Kind::List => {
let mut imports = Vec::new();
let mut values = Vec::new();
@@ -677,6 +684,13 @@ fn resolve_file_value(
}
imports.push(importer.describe());
}
+ JsonValue::String(text) => match import::interpolated(&text, Some(dir)) {
+ Some(importer) => {
+ values.push(from_import(Kind::Text, &importer)?);
+ imports.push(importer.describe());
+ }
+ None => values.push(JsonValue::String(text)),
+ },
other => values.push(other),
}
}