Update blueprint library
This commit is contained in:
5
manager/Cargo.lock
generated
5
manager/Cargo.lock
generated
@ -74,11 +74,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "blueprint"
|
||||
version = "0.2.0"
|
||||
source = "git+https://git.nubo.sh/hulthe/blueprint.git#2d0875188e3d378a825d24348de4d92a228bf420"
|
||||
version = "0.3.0"
|
||||
source = "git+https://git.nubo.sh/hulthe/blueprint.git#0af5d72005bebca426eeff628c1f010d2e850f06"
|
||||
dependencies = [
|
||||
"nom",
|
||||
"structopt",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
use crate::error::{Error, ErrorLocation, Errors, InnerError};
|
||||
use crate::error::{Error, ErrorLocation, Errors};
|
||||
use crate::Config;
|
||||
use async_recursion::async_recursion;
|
||||
use blueprint::{parse_file, Env, Value};
|
||||
use blueprint::{parse_template, Env, Value};
|
||||
use futures::future::join_all;
|
||||
use serde::Serialize;
|
||||
use std::ffi::OsStr;
|
||||
@ -105,8 +105,7 @@ async fn file(cfg: &Config, env: &Env, relative: PathBuf) -> Result<(), Error> {
|
||||
.with_location(&template_path)?;
|
||||
|
||||
let mut rendered = Vec::<u8>::new();
|
||||
parse_file(&file_str)
|
||||
.map_err(|_| InnerError::TemplateParseErr)
|
||||
parse_template(&file_str)
|
||||
.with_location(&template_path)?
|
||||
.write(&env, &mut rendered)
|
||||
.with_location(&template_path)?;
|
||||
|
||||
@ -18,7 +18,7 @@ pub enum InnerError {
|
||||
IoErr(#[from] io::Error),
|
||||
|
||||
#[error("Failed to parse template file")]
|
||||
TemplateParseErr,
|
||||
TemplateErr(#[from] blueprint::Error),
|
||||
}
|
||||
|
||||
impl From<Vec<Error>> for Errors {
|
||||
|
||||
Reference in New Issue
Block a user