pub fn resolve_full(
template_env: HashMap<String, String>,
profile_env: HashMap<String, String>,
workbench_env: HashMap<String, String>,
feature_env: HashMap<String, String>,
script_env: HashMap<String, String>,
preserve_current: bool,
) -> HashMap<String, String>Expand description
Resolves the final set of environment variables.
This function merges variables from:
- Template defaults
- Profile-specific static variables
- Workbench environment variables
- Feature flag variables
- Rhai script output
- Current process environment
§Arguments
template_env- Environment variables from templatesprofile_env- Environment variables from profileworkbench_env- Environment variables from workbench selectionfeature_env- Environment variables from feature flagsscript_env- Environment variables from Rhai scriptpreserve_current- Whether to preserve current process environment
§Returns
Final resolved HashMap of environment variables
§Example
use crate::Maintain::Source::Build::Rhai::EnvironmentResolver;
let templates = HashMap::from([("PATH", "/usr/bin".to_string())]);
let profile = HashMap::from([("NODE_ENV", "development".to_string())]);
let workbench = HashMap::from([("Mountain", "true".to_string())]);
let features = HashMap::from([("FEATURE_TAURI_IPC", "true".to_string())]);
let script = HashMap::from([("RUST_LOG", "debug".to_string())]);
let final_env = EnvironmentResolver::resolve_full(
templates, profile, workbench, features, script, true
);