update hooks functions
This commit is contained in:
@ -5,7 +5,8 @@ use std::io::{self, Write};
|
||||
use std::cell::RefCell;
|
||||
|
||||
use super::get_aeropkg_base;
|
||||
use crate::utils::parser::{self, env::get_install_env, pkginfo, repoinfo};
|
||||
use crate::utils::parser::{self, env::get_install_env, repoinfo, pkginfo, env::get_custom_env};
|
||||
use crate::utils::shell;
|
||||
use crate::commands::link::link;
|
||||
use crate::commands::run::config::config;
|
||||
|
||||
@ -58,11 +59,15 @@ pub fn download_packages(
|
||||
) {
|
||||
for pkgname in packages {
|
||||
let effective_repo = match repo {
|
||||
Some(r) => r.to_string(),
|
||||
None => pkginfo::get_priority_repo(pkgname),
|
||||
Some(r) => &r.to_string(),
|
||||
None => &pkginfo::get_priority_repo(pkgname),
|
||||
};
|
||||
|
||||
download(&effective_repo, pkgname, force, recursive);
|
||||
download(effective_repo, pkgname, force, recursive);
|
||||
let pkg_md_path = &crate::commands::get_aeropkg_var().join(format!("{}/{}.md", effective_repo, pkgname));
|
||||
let full_env = &get_custom_env(effective_repo, pkgname, pkg_md_path);
|
||||
shell::run_install_repo_hook_script(effective_repo, full_env);
|
||||
shell::run_install_hook_script(full_env);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user