MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / remove_env_key

Method remove_env_key

crates/openshell-core/src/provider_credentials.rs:87–96  ·  view source on GitHub ↗

Remove a key from the credential snapshot's child env. Used when a sandbox-side service (e.g., metadata server) fails to start and the corresponding env var should not be inherited by child processes or SSH sessions.

(&self, key: &str)

Source from the content-addressed store, hash-verified

85 /// and the corresponding env var should not be inherited by child processes
86 /// or SSH sessions.
87 pub fn remove_env_key(&self, key: &str) {
88 let mut inner = self
89 .inner
90 .write()
91 .expect("provider credential state poisoned");
92 inner.suppressed_keys.insert(key.to_string());
93 let mut env = (*inner.current).clone();
94 env.child_env.remove(key);
95 inner.current = Arc::new(env);
96 }
97
98 /// Return `child_env` with GCP static config vars resolved to real values.
99 ///

Callers 2

run_sandboxFunction · 0.80

Calls 2

writeMethod · 0.45
removeMethod · 0.45