Skip to main content

Mountain/IPC/WindServiceHandlers/Terminal/
LocalPTYGetEnvironment.rs

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