MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / get_os

Method get_os

crates/chat-cli/src/os/env.rs:87–99  ·  view source on GitHub ↗
(&self, key: K)

Source from the content-addressed store, hash-verified

85 }
86
87 pub fn get_os<K: AsRef<OsStr>>(&self, key: K) -> Option<OsString> {
88 use inner::Inner;
89 match &self.0 {
90 Inner::Real => env::var_os(key.as_ref()),
91 Inner::Fake(fake) => fake
92 .lock()
93 .unwrap()
94 .vars
95 .get(key.as_ref().to_str()?)
96 .cloned()
97 .map(OsString::from),
98 }
99 }
100
101 /// Sets the environment variable `key` to the value `value` for the currently running
102 /// process.

Callers 9

in_codespacesMethod · 0.45
in_ciMethod · 0.45
in_appimageMethod · 0.45
is_log_stdout_enabledFunction · 0.45
is_telemetry_disabledFunction · 0.45
is_truecolor_disabledFunction · 0.45
is_remote_fakeFunction · 0.45
in_codespacesFunction · 0.45
in_ciFunction · 0.45

Calls 3

mapMethod · 0.80
as_refMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected