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

Method new

crates/chat-cli/src/os/env.rs:47–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45
46impl Env {
47 pub fn new() -> Self {
48 if cfg!(test) && !is_integ_test() {
49 match cfg!(windows) {
50 true => Env::from_slice(&[
51 ("USERPROFILE", ACTIVE_USER_HOME),
52 ("USERNAME", "testuser"),
53 ("PATH", ""),
54 ]),
55 false => Env::from_slice(&[("HOME", ACTIVE_USER_HOME), ("USER", "testuser"), ("PATH", "")]),
56 }
57 } else {
58 Env(inner::Inner::Real)
59 }
60 }
61
62 /// Create a fake process environment from a slice of tuples.
63 pub fn from_slice(vars: &[(&str, &str)]) -> Self {

Callers

nothing calls this directly

Calls 2

EnvClass · 0.85
is_integ_testFunction · 0.50

Tested by

no test coverage detected