From 689526fb923b3ddbac77ed0337b434e443055c83 Mon Sep 17 00:00:00 2001 From: TraceLumen Date: Thu, 10 Sep 2026 23:42:44 +0300 Subject: [PATCH] fix pkg disable ignoring mount overlay flag --- src/commands/disable.rs | 6 +++++- src/commands/link.rs | 5 +---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/commands/disable.rs b/src/commands/disable.rs index 668ce0a..962e330 100644 --- a/src/commands/disable.rs +++ b/src/commands/disable.rs @@ -1,6 +1,7 @@ use std::fs; use crate::utils::fs::removelink::removelink; use crate::utils::shell::*; +use crate::utils::parser::env::get_install_env; pub fn disable(repo: &String, pkgname: &String) { let source = &crate::commands::get_aeropkg_base().join(repo).join(pkgname); @@ -23,7 +24,10 @@ pub fn disable(repo: &String, pkgname: &String) { if src.exists() { removelink(src, dest).map_err(|e| format!("Failed to remove link {} to {}: {}", src.display(), dest.display(), e)).unwrap() } } - mount_overlay(); + let builded_pkg_md_path = &crate::commands::get_aeropkg_base().join(repo).join(pkgname).join("build-script.md"); + let full_env = get_install_env(repo, pkgname, builded_pkg_md_path, "link"); + let mount_usr_dir_flag = full_env.get("mount_usr_dir").is_some(); + if mount_usr_dir_flag { mount_overlay() } shell_update(); fs::File::create(source.join("disabled")).ok(); diff --git a/src/commands/link.rs b/src/commands/link.rs index 818966d..fe1e959 100644 --- a/src/commands/link.rs +++ b/src/commands/link.rs @@ -29,10 +29,7 @@ pub fn link(repo: &String, pkgname: &String) { let builded_pkg_md_path = &crate::commands::get_aeropkg_base().join(repo).join(pkgname).join("build-script.md"); let full_env = get_install_env(repo, pkgname, builded_pkg_md_path, "link"); - let mount_usr_dir_flag = full_env.get("mount_usr_dir").is_some(); - if mount_usr_dir_flag { - mount_overlay(); - } + if mount_usr_dir_flag { mount_overlay() } shell_update() }