Skip to content
This repository has been archived by the owner on Apr 18, 2019. It is now read-only.

Commit

Permalink
compile install hook in compile_from_package_install
Browse files Browse the repository at this point in the history
Signed-off-by: mwrock <matt@mattwrock.com>
  • Loading branch information
mwrock committed Dec 6, 2018
1 parent 2997bce commit b0a15ec
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/core/src/templating/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ use serde_json;
use error::{Error, Result};
use fs;
use package::PackageInstall;
use templating::hooks::{Hook, InstallHook};

pub use self::context::RenderContext;

Expand All @@ -43,7 +44,12 @@ pub fn compile_from_package_install(package: &PackageInstall) -> Result<()> {
let cfg_renderer = config::CfgRenderer::new(pkg.path.join("config"))?;
cfg_renderer.compile(&pkg.name, &pkg, &ctx)?;

//hooks::HookTable::from_package_install(package, None).compile(&pkg.name, &ctx);
if let Some(ref hook) = InstallHook::load(
&pkg.name,
&package.installed_path.join("hooks"),
&fs::svc_hooks_path(&pkg.name)) {
hook.compile(&pkg.name, &ctx)?;
};

Ok(())
}
Expand Down

0 comments on commit b0a15ec

Please sign in to comment.