Mountain/IPC/WindServiceHandlers/Terminal/LocalPTYGetEnvironment.rs
1#![allow(non_snake_case)]
2
3//! Snapshot the Mountain process environment as a `HashMap`.
4//! Inherited by every PTY spawned through `TerminalCreate`. Includes
5//! the keys merged in by `EnhanceShellEnvironment` at boot, so a
6//! Finder-launched `.app` exposes the user's interactive shell PATH
7//! / NVM_DIR / HOMEBREW_PREFIX / … to terminals it spawns.
8
9use std::collections::HashMap;
10
11use serde_json::{Value, json};
12
13pub async fn LocalPTYGetEnvironment() -> Result<Value, String> {
14 let Env:HashMap<String, String> = std::env::vars().collect();
15 Ok(json!(Env))
16}