feat: enhance install command to accept multiple package specifications and improve runtime environment handling

This commit is contained in:
2026-03-01 21:47:44 -06:00
parent 3080eea58a
commit 6cae1f636a
9 changed files with 524 additions and 345 deletions
+16
View File
@@ -0,0 +1,16 @@
//! Shared runtime environment defaults for script and hook execution.
use std::path::Path;
/// Deterministic command search path for shell scripts and hook commands.
pub const SAFE_SCRIPT_PATH: &str = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";
/// Return the deterministic command search path used for script execution.
pub fn safe_script_path() -> &'static str {
SAFE_SCRIPT_PATH
}
/// Prepend a helper binary directory before the deterministic script path.
pub fn prepend_helper_to_safe_path(helper_bin_dir: &Path) -> String {
format!("{}:{}", helper_bin_dir.display(), SAFE_SCRIPT_PATH)
}