resolve_environment_dual_path

Function resolve_environment_dual_path 

Source
fn resolve_environment_dual_path(
    profile: &Profile,
    config: &LandConfig,
    merge_env: bool,
    cli_overrides: &[(String, String)],
) -> HashMap<String, String>
Expand description

Resolve environment variables with dual-path merging.

This function implements the dual-path environment resolution:

  • Path A: Shell environment variables (from process)
  • Path B: CLI profile configuration (from land-config.json)

Merge priority (lowest to highest):

  1. Template defaults
  2. Shell environment variables (if merge_env is true)
  3. Profile environment variables
  4. CLI –env overrides

§Arguments

  • profile - The profile configuration
  • config - The land configuration
  • merge_env - Whether to merge with shell environment
  • cli_overrides - CLI –env override pairs

§Returns

Merged HashMap of environment variables