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

Function resolve_gateway_name

crates/openshell-cli/src/main.rs:143–152  ·  view source on GitHub ↗
(gateway_flag: &Option<String>)

Source from the content-addressed store, hash-verified

141}
142
143fn resolve_gateway_name(gateway_flag: &Option<String>) -> Option<String> {
144 gateway_flag
145 .clone()
146 .or_else(|| {
147 std::env::var("OPENSHELL_GATEWAY")
148 .ok()
149 .filter(|v| !v.trim().is_empty())
150 })
151 .or_else(load_active_gateway)
152}
153
154/// Apply authentication token from local storage based on gateway auth mode.
155///

Callers 1

mainFunction · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected