Skip to content

Commit

Permalink
thar-be-settings: log a render error when running in --all mode
Browse files Browse the repository at this point in the history
When running in `--all` mode, thar-be-settings does not fail
when a template fails to render. This commit logs a message
with the appropriate details in the event of a failure.
  • Loading branch information
zmrow committed Oct 17, 2019
1 parent 2924141 commit d775985
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions workspaces/api/thar-be-settings/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ pub fn render_config_files(
let rendered = try_rendered.context(error::TemplateRender { template: name })?;
rendered_configs.push(RenderedConfigFile::new(&metadata.path, rendered));
} else {
if let Ok(rendered) = try_rendered {
rendered_configs.push(RenderedConfigFile::new(&metadata.path, rendered));
match try_rendered {
Ok(rendered) => {
rendered_configs.push(RenderedConfigFile::new(&metadata.path, rendered))
}
Err(err) => warn!("Unable to render template '{}': {}", &name, err),
}
}
}
Expand Down

0 comments on commit d775985

Please sign in to comment.