Compare commits

..

No commits in common. "cd7dc90657478035dfcae196ddc3130acc8435b6" and "cdc0c02e37136de228f46fa37ffe38639932a88a" have entirely different histories.

2 changed files with 6 additions and 4 deletions

View file

@ -9,7 +9,7 @@ edition = "2021"
pico-args = "0.5.0"
termion = "2.0.1"
toml = "0.7.6"
upon = "0.8.1"
upon = "0.7.1"
[profile.release]
opt-level = "s"

View file

@ -92,15 +92,17 @@ pub fn build(targets: &Vec<Map<String, Value>>, template_dir: String, config: &C
let content = read_to_string(path).unwrap();
let template = engine.compile(&content);
if let Err(error) = template {
if template.is_err() {
let error = template.err().unwrap();
println!(" {BOLD}{FAILURE}failed to compile template:{RESET}\n {FAILURE}{error}\n {BOLD}skipping{RESET}");
continue;
}
// render
println!(" {ITALIC}rendering{RESET}");
let render = template.unwrap().render(&engine, &context).to_string();
if let Err(error) = render {
let render = template.unwrap().render(&context).to_string();
if render.is_err() {
let error = render.err().unwrap();
println!(" {BOLD}{FAILURE}failed to render template:{RESET}\n {FAILURE}{error}\n {BOLD}skipping{RESET}");
continue;
}