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

Method set

crates/openshell-cli/src/run.rs:7886–7892  ·  view source on GitHub ↗
(key: &'static str, value: &str)

Source from the content-addressed store, hash-verified

7884 #[allow(unsafe_code)]
7885 impl EnvVarGuard {
7886 fn set(key: &'static str, value: &str) -> Self {
7887 let original = std::env::var(key).ok();
7888 unsafe {
7889 std::env::set_var(key, value);
7890 }
7891 Self { key, original }
7892 }
7893
7894 fn unset(key: &'static str) -> Self {
7895 let original = std::env::var(key).ok();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected